1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161
|
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
@import url("chrome://global/skin/in-content/common.css");
:root {
/* override --in-content-page-background from common-shared.css */
background-color: transparent;
--fxview-background-color: var(--newtab-background-color, var(--in-content-page-background));
--fxview-background-color-secondary: var(--newtab-background-color-secondary, light-dark(#ffffff, #42414d));
--fxview-element-background-hover: light-dark(
color-mix(in srgb, var(--fxview-background-color) 90%, currentColor),
color-mix(in srgb, var(--fxview-background-color) 80%, white)
);
--fxview-element-background-active: light-dark(
color-mix(in srgb, var(--fxview-background-color) 80%, currentColor),
color-mix(in srgb, var(--fxview-background-color) 60%, white)
);
--fxview-text-primary-color: var(--newtab-text-primary-color, var(--in-content-page-color));
--fxview-text-secondary-color: color-mix(in srgb, currentColor 70%, transparent);
--fxview-text-color-hover: var(--newtab-text-primary-color);
--fxview-primary-action-background: var(--newtab-primary-action-background, light-dark(#0061e0, #00ddff));
--fxview-border: var(--border-color-transparent);
--fxview-indicator-stroke-color-hover: light-dark(#deddde, #5d5c66);
/* ensure utility button hover states match those of the rest of the page */
--in-content-button-background-hover: var(--fxview-element-background-hover);
--in-content-button-background-active: var(--fxview-element-background-active);
--in-content-button-text-color-hover: var(--fxview-text-color-hover);
--fxview-sidebar-width: 288px;
--fxview-margin-top: 72px;
--fxview-card-padding-inline: 4px;
/* copy over newtab background color from activity-stream-[os].css files */
--newtab-background-color: light-dark(#f9f9fb, #2b2a33);
--fxview-card-header-font-weight: 500;
&[lwt-newtab] {
color-scheme: light;
}
&[lwt-newtab-brighttext] {
color-scheme: dark;
}
}
@media (forced-colors) {
:root {
--fxview-element-background-hover: ButtonText;
--fxview-element-background-active: ButtonText;
--fxview-text-color-hover: ButtonFace;
--newtab-primary-action-background: LinkText;
--newtab-background-color: Canvas;
--newtab-background-color-secondary: Canvas;
}
}
@media (max-width: 52rem) {
:root {
--fxview-sidebar-width: 82px;
}
}
body {
display: grid;
gap: 12px;
grid-template-columns: var(--fxview-sidebar-width) 1fr;
background-color: var(--fxview-background-color);
color: var(--fxview-text-primary-color);
@media (max-width: 52rem) {
display: flex;
}
}
.main-container {
width: 90%;
margin: 0 auto;
min-width: 43rem;
max-width: 71rem;
}
@media (min-width: 120rem) {
.main-container {
margin-inline-start: 148px;
}
}
.page-header {
margin: 0;
}
.sticky-container {
position: sticky;
top: 0;
padding-block: var(--fxview-margin-top) 33px;
z-index: 1;
display: flex;
flex-direction: column;
gap: 35px;
}
.sticky-container.bottom-fade {
/*
* padding-inline is doubled to allow for the negative margin below to offset the
* container so that the box-shadows on the cards are hidden as they pass underneath.
*/
padding-inline: calc(var(--fxview-card-padding-inline) * 2);
margin: 0 calc(var(--fxview-card-padding-inline) * -1);
background: linear-gradient(to bottom, var(--fxview-background-color) 0%, var(--fxview-background-color) 95%, transparent 100%);
/* When you use HCM or set custom colors, you can't use a gradient. */
@media (forced-colors) {
background: var(--fxview-background-color);
}
}
.cards-container {
padding-inline: var(--fxview-card-padding-inline);
}
view-opentabs-contextmenu {
display: contents;
}
/* This should be supported within panel-{item,list} rather than modifying it */
panel-item::part(button) {
padding-inline-start: 12px;
cursor: pointer;
}
panel-item::part(button):hover {
background-color: var(--fxview-element-background-hover);
color: var(--fxview-text-color-hover);
}
panel-item::part(button):hover:active {
background-color: var(--fxview-element-background-active);
}
fxview-empty-state {
&:not([isSelectedTab]) button[slot="primary-action"] {
margin-inline-start: 0;
}
/* these illustrations need a larger width otherwise they look too small */
&.synced-tabs::part(image-container) {
min-width: 250px;
}
/* center align the empty state image */
&.recentlyclosed::part(image-container) {
margin-inline-start: 50px;
}
/* align empty state text with synced tabs on recent browsing page */
&.recentlyclosed::part(main) {
padding-inline-start: 50px;
}
}
|