Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consistent Pocket New Tab section styling #392

Draft
wants to merge 6 commits into
base: ESR115
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 5 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
24 changes: 10 additions & 14 deletions browser/components/newtab/css/activity-stream-linux.css
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK. This code not recommend to use.

Use NodeJS to fix this problem. But nice try.

info: https://firefox-source-docs.mozilla.org/browser/components/newtab/docs/index.html

Original file line number Diff line number Diff line change
Expand Up @@ -2688,7 +2688,7 @@ main.has-snippet {

.ds-header,
.ds-layout .section-title span {
color: var(--newtab-text-primary-color);
color: rgb(255, 255, 255);
font-size: 17px;
font-weight: 600;
line-height: 20px;
Expand All @@ -2702,7 +2702,7 @@ main.has-snippet {
margin: auto;
}
.collapsible-section.ds-layout .section-top-bar .learn-more-link a {
color: var(--newtab-primary-action-background);
color: #ffffff8e;
font-weight: 500;
}
.collapsible-section.ds-layout .section-top-bar .learn-more-link a:is(:focus, :hover) {
Expand All @@ -2711,17 +2711,23 @@ main.has-snippet {

.ds-onboarding-container,
.ds-card-grid .ds-card {
background: #FFF;
background-color: color-mix(in srgb, var(--newtab-background-color) 50%, transparent);
border: 1px solid rgba(170, 170, 170, 0.6);
border-radius: 4px;
}
.ds-card-grid .ds-card:is(.active, :focus, :hover) {
background: var(--newtab-element-hover-color);
}
[lwt-newtab-brighttext] .ds-onboarding-container,
[lwt-newtab-brighttext] .ds-card-grid .ds-card {
background: none;
}
.floorp-backdrop-blur-enable .ds-card-grid .ds-card {
backdrop-filter: blur(12px);
}
.ds-onboarding-container:not(.placeholder),
.ds-card-grid .ds-card:not(.placeholder) {
border-radius: 8px;
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}
[lwt-newtab-brighttext] .ds-onboarding-container:not(.placeholder),
[lwt-newtab-brighttext] .ds-card-grid .ds-card:not(.placeholder) {
Expand Down Expand Up @@ -3574,21 +3580,11 @@ main.has-snippet {
flex-direction: column;
text-decoration: none;
}
.ds-card .ds-card-link:hover header {
color: var(--newtab-primary-action-background);
}
.ds-card .ds-card-link:focus {
border: 0;
outline: 0;
box-shadow: 0 0 0 3px var(--newtab-primary-action-background-dimmed), 0 0 0 1px var(--newtab-primary-action-background);
transition: none;
}
.ds-card .ds-card-link:focus header {
color: var(--newtab-primary-action-background);
}
.ds-card .ds-card-link:active header {
color: var(--newtab-primary-element-active-color);
}
.ds-card .meta {
display: flex;
flex-direction: column;
Expand Down
30 changes: 9 additions & 21 deletions browser/components/newtab/css/activity-stream-mac.css
Original file line number Diff line number Diff line change
Expand Up @@ -2692,7 +2692,7 @@ main.has-snippet {

.ds-header,
.ds-layout .section-title span {
color: var(--newtab-text-primary-color);
color: rgb(255, 255, 255);
font-size: 17px;
font-weight: 600;
line-height: 20px;
Expand All @@ -2706,7 +2706,7 @@ main.has-snippet {
margin: auto;
}
.collapsible-section.ds-layout .section-top-bar .learn-more-link a {
color: var(--newtab-primary-action-background);
color: #ffffff8e;
font-weight: 500;
}
.collapsible-section.ds-layout .section-top-bar .learn-more-link a:is(:focus, :hover) {
Expand All @@ -2715,21 +2715,19 @@ main.has-snippet {

.ds-onboarding-container,
.ds-card-grid .ds-card {
background: #FFF;
background-color: color-mix(in srgb, var(--newtab-background-color) 50%, transparent);
border: 1px solid rgba(170, 170, 170, 0.6);
border-radius: 4px;
}
[lwt-newtab-brighttext] .ds-onboarding-container,
[lwt-newtab-brighttext] .ds-card-grid .ds-card {
background: none;
.ds-card-grid .ds-card:is(.active, :focus, :hover) {
background: var(--newtab-element-hover-color);
}
.floorp-backdrop-blur-enable .ds-card-grid .ds-card {
backdrop-filter: blur(12px);
}
.ds-onboarding-container:not(.placeholder),
.ds-card-grid .ds-card:not(.placeholder) {
border-radius: 8px;
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}
[lwt-newtab-brighttext] .ds-onboarding-container:not(.placeholder),
[lwt-newtab-brighttext] .ds-card-grid .ds-card:not(.placeholder) {
background: var(--newtab-background-color-secondary);
}
.ds-onboarding-container:not(.placeholder) .img-wrapper .img img,
.ds-onboarding-container:not(.placeholder) .img-wrapper .img .placeholder-image,
Expand Down Expand Up @@ -3578,21 +3576,11 @@ main.has-snippet {
flex-direction: column;
text-decoration: none;
}
.ds-card .ds-card-link:hover header {
color: var(--newtab-primary-action-background);
}
.ds-card .ds-card-link:focus {
border: 0;
outline: 0;
box-shadow: 0 0 0 3px var(--newtab-primary-action-background-dimmed), 0 0 0 1px var(--newtab-primary-action-background);
transition: none;
}
.ds-card .ds-card-link:focus header {
color: var(--newtab-primary-action-background);
}
.ds-card .ds-card-link:active header {
color: var(--newtab-primary-element-active-color);
}
.ds-card .meta {
display: flex;
flex-direction: column;
Expand Down
30 changes: 9 additions & 21 deletions browser/components/newtab/css/activity-stream-windows.css
Original file line number Diff line number Diff line change
Expand Up @@ -2688,7 +2688,7 @@ main.has-snippet {

.ds-header,
.ds-layout .section-title span {
color: var(--newtab-text-primary-color);
color: rgb(255, 255, 255);
font-size: 17px;
font-weight: 600;
line-height: 20px;
Expand All @@ -2702,7 +2702,7 @@ main.has-snippet {
margin: auto;
}
.collapsible-section.ds-layout .section-top-bar .learn-more-link a {
color: var(--newtab-primary-action-background);
color: #ffffff8e;
font-weight: 500;
}
.collapsible-section.ds-layout .section-top-bar .learn-more-link a:is(:focus, :hover) {
Expand All @@ -2711,21 +2711,19 @@ main.has-snippet {

.ds-onboarding-container,
.ds-card-grid .ds-card {
background: #FFF;
background-color: color-mix(in srgb, var(--newtab-background-color) 50%, transparent);
border: 1px solid rgba(170, 170, 170, 0.6);
border-radius: 4px;
}
[lwt-newtab-brighttext] .ds-onboarding-container,
[lwt-newtab-brighttext] .ds-card-grid .ds-card {
background: none;
.ds-card-grid .ds-card:is(.active, :focus, :hover) {
background: var(--newtab-element-hover-color);
}
.floorp-backdrop-blur-enable .ds-card-grid .ds-card {
backdrop-filter: blur(12px);
}
.ds-onboarding-container:not(.placeholder),
.ds-card-grid .ds-card:not(.placeholder) {
border-radius: 8px;
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}
[lwt-newtab-brighttext] .ds-onboarding-container:not(.placeholder),
[lwt-newtab-brighttext] .ds-card-grid .ds-card:not(.placeholder) {
background: var(--newtab-background-color-secondary);
}
.ds-onboarding-container:not(.placeholder) .img-wrapper .img img,
.ds-onboarding-container:not(.placeholder) .img-wrapper .img .placeholder-image,
Expand Down Expand Up @@ -3574,21 +3572,11 @@ main.has-snippet {
flex-direction: column;
text-decoration: none;
}
.ds-card .ds-card-link:hover header {
color: var(--newtab-primary-action-background);
}
.ds-card .ds-card-link:focus {
border: 0;
outline: 0;
box-shadow: 0 0 0 3px var(--newtab-primary-action-background-dimmed), 0 0 0 1px var(--newtab-primary-action-background);
transition: none;
}
.ds-card .ds-card-link:focus header {
color: var(--newtab-primary-action-background);
}
.ds-card .ds-card-link:active header {
color: var(--newtab-primary-element-active-color);
}
.ds-card .meta {
display: flex;
flex-direction: column;
Expand Down
2 changes: 2 additions & 0 deletions floorp/browser/themes/designs/lepton/leptonContent.css
dominichayesferen marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -355,12 +355,14 @@
}
/* Background */
.top-site-outer,
.ds-card-grid .ds-card,
#searchSubmit,
button.icon,
button.close-button {
transition: background 1.5s var(--animation-easing-function);
}
.top-site-outer:hover,
.ds-card-grid .ds-card:hover,
#searchSubmit:hover,
button.icon:hover,
button.close-button:hover {
Expand Down