Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion special-pages/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
},
"license": "ISC",
"devDependencies": {
"@duckduckgo/design-tokens": "github:duckduckgo/design-tokens#v0.1.0",
"@duckduckgo/design-tokens": "github:duckduckgo/design-tokens#v0.2.0",
"@duckduckgo/messaging": "*",
"chokidar": "^5.0.0",
"fast-check": "^4.4.0",
Expand Down
28 changes: 14 additions & 14 deletions special-pages/pages/errorpage/src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -70,21 +70,21 @@ body {
}

/* Theme variants - light mode */
[data-theme-variant="coolGray"] { background: var(--ds-color-cool-gray-light-surface-primary); }
[data-theme-variant="slateBlue"] { background: var(--ds-color-slate-blue-light-surface-primary); }
[data-theme-variant="green"] { background: var(--ds-color-green-light-surface-primary); }
[data-theme-variant="violet"] { background: var(--ds-color-violet-light-surface-primary); }
[data-theme-variant="rose"] { background: var(--ds-color-rose-light-surface-primary); }
[data-theme-variant="orange"] { background: var(--ds-color-orange-light-surface-primary); }
[data-theme-variant="desert"] { background: var(--ds-color-desert-light-surface-primary); }
[data-theme-variant="coolGray"] { background: var(--ds-color-theme-cool-gray-light-surface-primary); }
[data-theme-variant="slateBlue"] { background: var(--ds-color-theme-slate-blue-light-surface-primary); }
[data-theme-variant="green"] { background: var(--ds-color-theme-green-light-surface-primary); }
[data-theme-variant="violet"] { background: var(--ds-color-theme-violet-light-surface-primary); }
[data-theme-variant="rose"] { background: var(--ds-color-theme-rose-light-surface-primary); }
[data-theme-variant="orange"] { background: var(--ds-color-theme-orange-light-surface-primary); }
[data-theme-variant="desert"] { background: var(--ds-color-theme-desert-light-surface-primary); }

/* Theme variants - dark mode */
@media (prefers-color-scheme: dark) {
[data-theme-variant="coolGray"] { background: var(--ds-color-cool-gray-dark-surface-primary); }
[data-theme-variant="slateBlue"] { background: var(--ds-color-slate-blue-dark-surface-primary); }
[data-theme-variant="green"] { background: var(--ds-color-green-dark-surface-primary); }
[data-theme-variant="violet"] { background: var(--ds-color-violet-dark-surface-primary); }
[data-theme-variant="rose"] { background: var(--ds-color-rose-dark-surface-primary); }
[data-theme-variant="orange"] { background: var(--ds-color-orange-dark-surface-primary); }
[data-theme-variant="desert"] { background: var(--ds-color-desert-dark-surface-primary); }
[data-theme-variant="coolGray"] { background: var(--ds-color-theme-cool-gray-dark-surface-primary); }
[data-theme-variant="slateBlue"] { background: var(--ds-color-theme-slate-blue-dark-surface-primary); }
[data-theme-variant="green"] { background: var(--ds-color-theme-green-dark-surface-primary); }
[data-theme-variant="violet"] { background: var(--ds-color-theme-violet-dark-surface-primary); }
[data-theme-variant="rose"] { background: var(--ds-color-theme-rose-dark-surface-primary); }
[data-theme-variant="orange"] { background: var(--ds-color-theme-orange-dark-surface-primary); }
[data-theme-variant="desert"] { background: var(--ds-color-theme-desert-dark-surface-primary); }
}
28 changes: 14 additions & 14 deletions special-pages/pages/history/styles/history-theme.css
Original file line number Diff line number Diff line change
Expand Up @@ -70,36 +70,36 @@ body {
}

[data-theme-variant="coolGray"] {
--default-light-background-color: var(--ds-color-cool-gray-light-surface-primary);
--default-dark-background-color: var(--ds-color-cool-gray-dark-surface-primary);
--default-light-background-color: var(--ds-color-theme-cool-gray-light-surface-primary);
--default-dark-background-color: var(--ds-color-theme-cool-gray-dark-surface-primary);
}

[data-theme-variant="slateBlue"] {
--default-light-background-color: var(--ds-color-slate-blue-light-surface-primary);
--default-dark-background-color: var(--ds-color-slate-blue-dark-surface-primary);
--default-light-background-color: var(--ds-color-theme-slate-blue-light-surface-primary);
--default-dark-background-color: var(--ds-color-theme-slate-blue-dark-surface-primary);
}

[data-theme-variant="green"] {
--default-light-background-color: var(--ds-color-green-light-surface-primary);
--default-dark-background-color: var(--ds-color-green-dark-surface-primary);
--default-light-background-color: var(--ds-color-theme-green-light-surface-primary);
--default-dark-background-color: var(--ds-color-theme-green-dark-surface-primary);
}

[data-theme-variant="violet"] {
--default-light-background-color: var(--ds-color-violet-light-surface-primary);
--default-dark-background-color: var(--ds-color-violet-dark-surface-primary);
--default-light-background-color: var(--ds-color-theme-violet-light-surface-primary);
--default-dark-background-color: var(--ds-color-theme-violet-dark-surface-primary);
}

[data-theme-variant="rose"] {
--default-light-background-color: var(--ds-color-rose-light-surface-primary);
--default-dark-background-color: var(--ds-color-rose-dark-surface-primary);
--default-light-background-color: var(--ds-color-theme-rose-light-surface-primary);
--default-dark-background-color: var(--ds-color-theme-rose-dark-surface-primary);
}

[data-theme-variant="orange"] {
--default-light-background-color: var(--ds-color-orange-light-surface-primary);
--default-dark-background-color: var(--ds-color-orange-dark-surface-primary);
--default-light-background-color: var(--ds-color-theme-orange-light-surface-primary);
--default-dark-background-color: var(--ds-color-theme-orange-dark-surface-primary);
}

[data-theme-variant="desert"] {
--default-light-background-color: var(--ds-color-desert-light-surface-primary);
--default-dark-background-color: var(--ds-color-desert-dark-surface-primary);
--default-light-background-color: var(--ds-color-theme-desert-light-surface-primary);
--default-dark-background-color: var(--ds-color-theme-desert-dark-surface-primary);
}
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
font-size: var(--title-3-em-font-size);
font-weight: var(--title-3-em-font-weight);
text-decoration: none;
color: var(--ntp-text-normal);
color: var(--ds-color-theme-text-primary);
height: 35px;
display: flex;
align-items: center;
Expand All @@ -109,7 +109,7 @@
min-width: 0;

&:hover, &:focus-visible {
color: var(--ntp-color-primary);
color: var(--ds-color-theme-accent-primary);
.favicon {
transform: scale(1.08)
}
Expand All @@ -133,7 +133,7 @@
background: transparent;
padding: 0;
margin: 0;
color: var(--ntp-text-normal);
color: var(--ds-color-theme-text-primary);
svg {
position: absolute;
top: 50%;
Expand Down Expand Up @@ -218,15 +218,15 @@
font-size: var(--small-label-font-size);
font-weight: var(--small-label-font-weight);
line-height: var(--small-label-line-height);
color: var(--ntp-text-normal);
color: var(--ds-color-theme-text-primary);
text-decoration: none;
min-width: 0;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;

&:hover, &:focus-visible {
color: var(--ntp-color-primary)
color: var(--ds-color-theme-accent-primary)
}

&:hover .time {
Expand All @@ -238,7 +238,7 @@
.time {
flex-shrink: 0;
margin-left: 8px;
color: var(--ntp-text-muted);
color: var(--ds-color-theme-text-secondary);
opacity: 0.6;
font-size: var(--small-label-font-size);
font-weight: var(--small-label-font-weight);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@
font-size: var(--title-3-em-font-size);
font-weight: var(--title-3-em-font-weight);
text-decoration: none;
color: var(--ntp-text-normal);
color: var(--ds-color-theme-text-primary);
height: 35px;
display: flex;
align-items: center;
Expand All @@ -111,7 +111,7 @@
min-width: 0;

&:hover, &:focus-visible {
color: var(--ntp-color-primary);
color: var(--ds-color-theme-accent-primary);
.favicon {
transform: scale(1.08)
}
Expand All @@ -135,7 +135,7 @@
background: transparent;
padding: 0;
margin: 0;
color: var(--ntp-text-normal);
color: var(--ds-color-theme-text-primary);
svg {
position: absolute;
top: 50%;
Expand Down Expand Up @@ -224,15 +224,15 @@
font-size: var(--small-label-font-size);
font-weight: var(--small-label-font-weight);
line-height: var(--small-label-line-height);
color: var(--ntp-text-normal);
color: var(--ds-color-theme-text-primary);
text-decoration: none;
min-width: 0;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;

&:hover, &:focus-visible {
color: var(--ntp-color-primary)
color: var(--ds-color-theme-accent-primary)
}

&:hover .time {
Expand All @@ -244,7 +244,7 @@
.time {
flex-shrink: 0;
margin-left: 8px;
color: var(--ntp-text-muted);
color: var(--ds-color-theme-text-secondary);
opacity: 0.6;
font-size: var(--small-label-font-size);
font-weight: var(--small-label-font-weight);
Expand Down Expand Up @@ -293,4 +293,4 @@
transform: rotate(180deg)
}
}
}
}
12 changes: 6 additions & 6 deletions special-pages/pages/new-tab/app/components/App.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ body[data-animate-background="true"] {
height: 100vh;
overflow: auto;
grid-area: main;
color: var(--ntp-text-normal);
color: var(--ds-color-theme-text-primary);
}

/* WebKit-only fix for layout shift when scrollbar appears */
Expand All @@ -66,7 +66,7 @@ body[data-animate-background="true"] {
}

.themeContext {
color: var(--ntp-text-normal);
color: var(--ds-color-theme-text-primary);
}

.mainLayout {
Expand Down Expand Up @@ -98,8 +98,8 @@ body[data-animate-background="true"] {
}

.aside {
color: var(--ntp-text-normal);
background: var(--ntp-surfaces-panel-background-color);
color: var(--ds-color-theme-text-primary);
background: var(--ds-color-theme-surface-tertiary);
grid-area: aside;
height: 100vh;
z-index: 1;
Expand Down Expand Up @@ -153,7 +153,7 @@ body[data-animate-background="true"] {

&::-webkit-scrollbar-thumb {
background: rgb(108, 108, 108);
border: 4px solid var(--ntp-surfaces-panel-background-color);
border: 4px solid var(--ds-color-theme-surface-tertiary);
border-radius: 6px;
}
}
Expand All @@ -164,4 +164,4 @@ body[data-animate-background="true"] {
.paddedErrorRecovery {
margin-top: 1rem;

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
}

&:has([data-errored=true]) {
outline: 1px solid var(--ntp-surface-border-color);
outline: 1px solid var(--ds-color-theme-container-border-primary);
[data-theme=dark] & {
outline-color: var(--color-white-at-9);
}
Expand All @@ -26,4 +26,4 @@

.companyImgIcon[data-loaded=true] {
opacity: 1;
}
}
11 changes: 3 additions & 8 deletions special-pages/pages/new-tab/app/components/Components.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import { useThemes } from '../customizer/themes.js';
import { useSignal } from '@preact/signals';
import { BackgroundConsumer } from './BackgroundProvider.js';
import { CustomizerThemesContext } from '../customizer/CustomizerProvider.js';
import { customizerData } from '../customizer/mocks.js';

const url = new URL(window.location.href);

const list = {
Expand All @@ -22,14 +24,7 @@ export function Components() {
const validIds = ids.filter((id) => entryIds.includes(id));
const filtered = validIds.length ? validIds.map((id) => /** @type {const} */ ([id, list[id]])) : entries;

/** @type {import('../../types/new-tab').CustomizerData} */
const data = {
background: { kind: 'default' },
userImages: [],
theme: 'system',
userColor: null,
};
const dataSignal = useSignal(data);
const dataSignal = useSignal(customizerData());
const { main, browser, variant } = useThemes(dataSignal);

return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ body[data-display="components"] {
padding-right: 0;

a {
color: var(--ntp-text-normal);
color: var(--ds-color-theme-text-primary);
}
}

.main {
height: 100vh;
overflow: auto;
color: var(--ntp-text-normal);
color: var(--ds-color-theme-text-primary);
}


Expand Down Expand Up @@ -65,7 +65,7 @@ body:has(.tubeGrid):has([data-isolated=true]) {
}

.itemLink {
color: var(--ntp-text-normal);
color: var(--ds-color-theme-text-primary);
padding: 0.2em 0.3em;
border: 1px solid var(--color-gray-60);
border-radius: var(--border-radius-xs);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
padding: 0;
line-height: 1;
background-color: transparent;
color: var(--ntp-text-muted);
color: var(--ds-color-theme-text-secondary);
border: none;
border-radius: 50%;
transition: all .3s;
Expand All @@ -26,7 +26,7 @@

&:active {
background-color: var(--color-black-at-18);
color: var(--ntp-text-normal);
color: var(--ds-color-theme-text-primary);
}

&:disabled {
Expand Down
Loading
Loading