theme: Replace gnome-shell-sass submodule with subtree
As the style has grown bigger and more complex, generating the different
variants from a common source has been a good decision. However given how
intertwined the theme is with gnome-shell itself, relying on a submodule
has proven to be quite painful. And as things stand right now, it is going
to get worse:
- using either pre-generated CSS or generating it at build time is
odd, and violates meson's strict separation between source- and
build directories; we are therefore considering dropping the CSS
and depending on sassc to always generate it at build time
- with the migration to gitlab, our workflow shifts decisively towards
branches; however there is no support in either git or gitlab for
handling two brances of separate repositories consecutively, which
gets particularly awkward for branches in a private namespace
With those pain points in mind, we will adjust our setup as follows:
- remove the submodule from gnome-shell and instead import the
sass as subtree
- after that, the sass sources can be changed like any other files
in the repository, and regular contributors can forget that there
was ever anything special about them
- whenever we want to update the classic style, we can push the subtree
changes and bump gnome-shell-extension's sass submodule
In other words: Updating the classic styling will become slightly more
painful, but not much and only for me; in return, everyone else can
stop fiddling with submodules (and buy me a beer).
2018-02-09 18:22:55 +00:00
|
|
|
//This is the RIGHT PLACE to edit the stylesheet
|
|
|
|
|
|
|
|
//let's start by telling people not to edit the generated CSS:
|
|
|
|
$cakeisalie: "This stylesheet is generated, DO NOT EDIT";
|
|
|
|
/* #{$cakeisalie} */
|
|
|
|
|
|
|
|
/* Copyright 2009, 2015 Red Hat, Inc.
|
|
|
|
*
|
|
|
|
* Portions adapted from Mx's data/style/default.css
|
|
|
|
* Copyright 2009 Intel Corporation
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify it
|
|
|
|
* under the terms and conditions of the GNU Lesser General Public License,
|
|
|
|
* version 2.1, as published by the Free Software Foundation.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope it will be useful, but WITHOUT ANY
|
|
|
|
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
|
|
|
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
|
|
|
|
* more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public License
|
|
|
|
* along with this program; if not, write to the Free Software Foundation,
|
|
|
|
* Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
|
|
|
|
*/
|
|
|
|
|
2019-12-18 21:25:03 +00:00
|
|
|
/* Global Values */
|
2019-06-18 13:29:00 +00:00
|
|
|
|
2019-12-18 21:25:03 +00:00
|
|
|
// padding, margin and spacing
|
|
|
|
$base_padding: 6px;
|
|
|
|
$base_margin: 4px;
|
2019-07-02 18:29:40 +00:00
|
|
|
|
2019-12-18 21:25:03 +00:00
|
|
|
// border radii
|
2021-01-05 12:57:25 +00:00
|
|
|
$base_border_radius: 8px;
|
2019-06-18 13:29:00 +00:00
|
|
|
|
2021-12-28 13:46:54 +00:00
|
|
|
// radii of things that display over other things, e.g. popovers
|
|
|
|
$modal_radius: $base_border_radius*2; // 24px
|
2019-06-18 13:29:00 +00:00
|
|
|
|
2021-07-15 06:18:48 +00:00
|
|
|
// Chroma key to flag when a background-color is always occluded, not visible.
|
|
|
|
// This allows any box-shadow behind it to be rendered more efficiently by
|
|
|
|
// omitting the middle rectangle.
|
|
|
|
$invisible_occluded_bg_color: rgba(3,2,1,0);
|
|
|
|
|
2019-12-18 21:25:03 +00:00
|
|
|
// fonts
|
|
|
|
$base_font_size: 11;
|
|
|
|
$text_shadow_color: if($variant == 'light', rgba(255,255,255,0.3), rgba(0,0,0,0.2));
|
theme: Replace gnome-shell-sass submodule with subtree
As the style has grown bigger and more complex, generating the different
variants from a common source has been a good decision. However given how
intertwined the theme is with gnome-shell itself, relying on a submodule
has proven to be quite painful. And as things stand right now, it is going
to get worse:
- using either pre-generated CSS or generating it at build time is
odd, and violates meson's strict separation between source- and
build directories; we are therefore considering dropping the CSS
and depending on sassc to always generate it at build time
- with the migration to gitlab, our workflow shifts decisively towards
branches; however there is no support in either git or gitlab for
handling two brances of separate repositories consecutively, which
gets particularly awkward for branches in a private namespace
With those pain points in mind, we will adjust our setup as follows:
- remove the submodule from gnome-shell and instead import the
sass as subtree
- after that, the sass sources can be changed like any other files
in the repository, and regular contributors can forget that there
was ever anything special about them
- whenever we want to update the classic style, we can push the subtree
changes and bump gnome-shell-extension's sass submodule
In other words: Updating the classic styling will become slightly more
painful, but not much and only for me; in return, everyone else can
stop fiddling with submodules (and buy me a beer).
2018-02-09 18:22:55 +00:00
|
|
|
|
2019-12-18 21:25:03 +00:00
|
|
|
// icons
|
2020-02-12 18:46:44 +00:00
|
|
|
$base_icon_size: 1.09em;
|
2022-02-07 18:22:40 +00:00
|
|
|
$large_icon_size: $base_icon_size*2; // 32px
|
2020-02-12 18:46:44 +00:00
|
|
|
// $base_icon_size: 16px;
|
theme: Replace gnome-shell-sass submodule with subtree
As the style has grown bigger and more complex, generating the different
variants from a common source has been a good decision. However given how
intertwined the theme is with gnome-shell itself, relying on a submodule
has proven to be quite painful. And as things stand right now, it is going
to get worse:
- using either pre-generated CSS or generating it at build time is
odd, and violates meson's strict separation between source- and
build directories; we are therefore considering dropping the CSS
and depending on sassc to always generate it at build time
- with the migration to gitlab, our workflow shifts decisively towards
branches; however there is no support in either git or gitlab for
handling two brances of separate repositories consecutively, which
gets particularly awkward for branches in a private namespace
With those pain points in mind, we will adjust our setup as follows:
- remove the submodule from gnome-shell and instead import the
sass as subtree
- after that, the sass sources can be changed like any other files
in the repository, and regular contributors can forget that there
was ever anything special about them
- whenever we want to update the classic style, we can push the subtree
changes and bump gnome-shell-extension's sass submodule
In other words: Updating the classic styling will become slightly more
painful, but not much and only for me; in return, everyone else can
stop fiddling with submodules (and buy me a beer).
2018-02-09 18:22:55 +00:00
|
|
|
|
2019-12-18 21:25:03 +00:00
|
|
|
// Stage
|
|
|
|
stage {
|
2019-12-19 15:38:27 +00:00
|
|
|
@include fontsize($base_font_size);
|
|
|
|
color: $fg_color;
|
theme: Replace gnome-shell-sass submodule with subtree
As the style has grown bigger and more complex, generating the different
variants from a common source has been a good decision. However given how
intertwined the theme is with gnome-shell itself, relying on a submodule
has proven to be quite painful. And as things stand right now, it is going
to get worse:
- using either pre-generated CSS or generating it at build time is
odd, and violates meson's strict separation between source- and
build directories; we are therefore considering dropping the CSS
and depending on sassc to always generate it at build time
- with the migration to gitlab, our workflow shifts decisively towards
branches; however there is no support in either git or gitlab for
handling two brances of separate repositories consecutively, which
gets particularly awkward for branches in a private namespace
With those pain points in mind, we will adjust our setup as follows:
- remove the submodule from gnome-shell and instead import the
sass as subtree
- after that, the sass sources can be changed like any other files
in the repository, and regular contributors can forget that there
was ever anything special about them
- whenever we want to update the classic style, we can push the subtree
changes and bump gnome-shell-extension's sass submodule
In other words: Updating the classic styling will become slightly more
painful, but not much and only for me; in return, everyone else can
stop fiddling with submodules (and buy me a beer).
2018-02-09 18:22:55 +00:00
|
|
|
}
|
|
|
|
|
2019-12-18 21:25:03 +00:00
|
|
|
/* Common Stylings */
|
|
|
|
|
|
|
|
// icon tiles
|
2022-02-02 18:17:42 +00:00
|
|
|
%tile {
|
2021-12-28 13:46:54 +00:00
|
|
|
border-radius: $base_border_radius * 2; // 16px
|
2019-12-19 15:38:27 +00:00
|
|
|
padding: $base_padding;
|
2022-02-15 16:00:51 +00:00
|
|
|
spacing: $base_padding;
|
2020-01-25 08:53:17 +00:00
|
|
|
border: 2px solid transparent;
|
2022-05-27 18:09:45 +00:00
|
|
|
transition-duration: 200ms;
|
2019-12-19 15:38:27 +00:00
|
|
|
text-align: center;
|
2022-10-13 16:51:17 +00:00
|
|
|
color: inherit;
|
|
|
|
|
2022-11-03 15:28:24 +00:00
|
|
|
@if $is_highcontrast {
|
|
|
|
border-color: $hc_inset_color;
|
|
|
|
}
|
2022-02-07 18:22:40 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// normal button styling
|
2022-10-13 16:51:17 +00:00
|
|
|
%button_common {
|
2022-11-03 15:28:24 +00:00
|
|
|
border-radius: $base_border_radius;
|
2020-01-14 18:09:03 +00:00
|
|
|
border-style: solid;
|
|
|
|
border-width: 1px;
|
2022-02-02 18:17:42 +00:00
|
|
|
font-weight: bold;
|
2022-02-07 18:22:40 +00:00
|
|
|
padding: $base_padding*.5 $base_padding*4;
|
2022-10-13 16:51:17 +00:00
|
|
|
}
|
2020-01-14 18:09:03 +00:00
|
|
|
|
2022-10-13 16:51:17 +00:00
|
|
|
%button {
|
|
|
|
@extend %button_common;
|
2020-01-14 18:09:03 +00:00
|
|
|
@include button(normal);
|
|
|
|
&:focus { @include button(focus);}
|
|
|
|
&:hover { @include button(hover);}
|
|
|
|
&:insensitive { @include button(insensitive);}
|
2022-11-03 15:28:24 +00:00
|
|
|
&:selected,
|
2022-02-07 18:22:40 +00:00
|
|
|
&:active { @include button(active);}
|
|
|
|
&:checked { @include button(checked);}
|
2023-05-17 18:54:49 +00:00
|
|
|
&.default { @include button(default);}
|
2022-08-02 17:26:53 +00:00
|
|
|
|
2022-10-13 16:51:17 +00:00
|
|
|
&.flat {
|
|
|
|
@include button(normal, $flat:true);
|
|
|
|
&:focus { @include button(focus, $flat:true);}
|
|
|
|
&:hover { @include button(hover, $flat:true);}
|
|
|
|
&:insensitive { @include button(insensitive, $flat:true);}
|
2022-11-03 15:28:24 +00:00
|
|
|
&:selected,
|
2022-10-13 16:51:17 +00:00
|
|
|
&:active { @include button(active, $flat:true);}
|
|
|
|
&:checked { @include button(checked, $flat:true);}
|
2023-05-17 18:54:49 +00:00
|
|
|
&.default { @include button(default, $flat:false);}
|
2022-10-13 16:51:17 +00:00
|
|
|
}
|
2022-08-02 17:26:53 +00:00
|
|
|
}
|
|
|
|
|
2022-02-07 18:22:40 +00:00
|
|
|
|
2022-11-03 15:28:24 +00:00
|
|
|
// normal entry style
|
2022-10-13 16:51:17 +00:00
|
|
|
%entry_common {
|
2022-11-03 15:28:24 +00:00
|
|
|
border-radius: $base_border_radius;
|
|
|
|
padding: $base_padding*1.5 $base_padding*1.5;
|
|
|
|
selection-background-color: $selected_bg_color;
|
|
|
|
selected-color: $selected_fg_color;
|
|
|
|
}
|
|
|
|
|
2022-10-13 16:51:17 +00:00
|
|
|
%entry {
|
|
|
|
@extend %entry_common;
|
|
|
|
@include entry(normal, $c:$fg_color);
|
|
|
|
&:hover { @include entry(hover, $c:$fg_color);}
|
|
|
|
&:focus { @include entry(focus, $c:$fg_color);}
|
|
|
|
&:insensitive { @include entry(insensitive, $c:$fg_color);}
|
|
|
|
|
|
|
|
StLabel.hint-text {
|
|
|
|
color: transparentize($fg_color, 0.3);
|
|
|
|
}
|
|
|
|
}
|
2021-12-28 13:46:54 +00:00
|
|
|
|
2022-11-03 15:28:24 +00:00
|
|
|
// buttons in dialogs/notifications
|
|
|
|
// lighter in color and have a greater radius
|
2019-12-18 21:25:03 +00:00
|
|
|
%bubble_button {
|
2019-12-19 15:38:27 +00:00
|
|
|
padding: $base_padding * 2;
|
2022-02-07 18:22:40 +00:00
|
|
|
font-weight: bold !important;
|
2022-02-23 17:45:59 +00:00
|
|
|
|
|
|
|
&:ltr {margin-right: 1px;}
|
|
|
|
&:rtl {margin-left: 1px;}
|
2022-02-02 18:17:42 +00:00
|
|
|
|
|
|
|
@include button(normal, $c:$bubble_buttons_color);
|
|
|
|
&:insensitive { @include button(insensitive, $c:$bubble_buttons_color);}
|
|
|
|
&:focus { @include button(focus, $c:$bubble_buttons_color);}
|
|
|
|
&:hover { @include button(hover, $c:$bubble_buttons_color);}
|
|
|
|
&:active { @include button(active, $c:$bubble_buttons_color);}
|
2022-02-07 18:22:40 +00:00
|
|
|
&:checked { @include button(checked, $c:$bubble_buttons_color);}
|
2022-10-13 16:51:17 +00:00
|
|
|
|
2022-02-04 19:46:49 +00:00
|
|
|
&:first-child:ltr {
|
2022-11-03 15:28:24 +00:00
|
|
|
border-radius: 0 0 0 $modal_radius;
|
2019-12-19 15:38:27 +00:00
|
|
|
}
|
2019-12-20 15:45:58 +00:00
|
|
|
|
2022-02-04 19:46:49 +00:00
|
|
|
&:last-child:ltr {
|
2022-11-03 15:28:24 +00:00
|
|
|
border-radius: 0 0 $modal_radius;
|
2022-02-07 18:22:40 +00:00
|
|
|
margin-right: 0 !important;
|
2019-12-19 15:38:27 +00:00
|
|
|
}
|
2022-02-04 19:46:49 +00:00
|
|
|
|
|
|
|
&:first-child:rtl {
|
2022-11-03 15:28:24 +00:00
|
|
|
border-radius: 0 0 $modal_radius;
|
2022-02-04 19:46:49 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
&:last-child:rtl {
|
2022-11-03 15:28:24 +00:00
|
|
|
border-radius: 0 0 0 $modal_radius;
|
2022-02-23 17:45:59 +00:00
|
|
|
margin-left: 0 !important;
|
2022-02-04 19:46:49 +00:00
|
|
|
}
|
2019-12-19 15:38:27 +00:00
|
|
|
|
2022-02-02 18:17:42 +00:00
|
|
|
&:first-child:last-child {
|
2022-11-30 18:27:39 +00:00
|
|
|
border-radius: 0 0 $modal_radius $modal_radius;
|
2022-02-23 17:45:59 +00:00
|
|
|
margin-left: 0 !important;
|
2022-02-07 18:22:40 +00:00
|
|
|
margin-right: 0 !important;
|
2019-12-19 15:38:27 +00:00
|
|
|
}
|
2020-01-14 18:09:03 +00:00
|
|
|
}
|
2022-02-07 18:22:40 +00:00
|
|
|
|
2022-11-03 15:28:24 +00:00
|
|
|
// tooltip
|
|
|
|
%tooltip {
|
2022-10-13 16:51:17 +00:00
|
|
|
background-color: transparentize(black, 0.1);
|
2023-05-02 13:31:12 +00:00
|
|
|
border: 1px solid transparentize($light_1, 0.9);
|
2022-10-13 16:51:17 +00:00
|
|
|
color: $light_1;
|
|
|
|
|
2022-11-03 15:28:24 +00:00
|
|
|
border-radius: 99px;
|
|
|
|
padding: $base_padding $base_padding * 2;
|
|
|
|
text-align: center;
|
|
|
|
|
|
|
|
@if $is_highcontrast {
|
2023-05-02 13:31:12 +00:00
|
|
|
background-color: black;
|
2022-10-13 16:51:17 +00:00
|
|
|
border-color: $hc_inset_color;
|
2022-11-03 15:28:24 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-02-07 18:22:40 +00:00
|
|
|
/* General Typography */
|
|
|
|
%large_title {
|
|
|
|
font-weight: 300;
|
|
|
|
@include fontsize(24);
|
|
|
|
}
|
|
|
|
|
|
|
|
%title_1 {
|
|
|
|
font-weight: 800;
|
|
|
|
@include fontsize(20);
|
|
|
|
}
|
|
|
|
|
|
|
|
%title_2 {
|
|
|
|
font-weight: 800;
|
|
|
|
@include fontsize(15);
|
|
|
|
}
|
|
|
|
|
|
|
|
%title_3 {
|
|
|
|
font-weight: 700;
|
|
|
|
@include fontsize(15);
|
|
|
|
}
|
|
|
|
|
|
|
|
%title_4 {
|
|
|
|
font-weight: 700;
|
|
|
|
@include fontsize(13);
|
|
|
|
}
|
|
|
|
|
|
|
|
%heading {
|
|
|
|
font-weight: 700;
|
|
|
|
@include fontsize(11);
|
|
|
|
}
|
|
|
|
|
|
|
|
%caption_heading {
|
|
|
|
font-weight: 700;
|
|
|
|
@include fontsize(9);
|
|
|
|
}
|
|
|
|
|
|
|
|
%caption {
|
|
|
|
font-weight: 400;
|
|
|
|
@include fontsize(9);
|
|
|
|
}
|
|
|
|
|
|
|
|
%smaller {
|
|
|
|
font-weight: 400;
|
|
|
|
@include fontsize(8);
|
|
|
|
}
|
|
|
|
|
|
|
|
%monospace {font-family: monospace;}
|
|
|
|
%numeric { font-feature-settings: "tnum";}
|
2022-10-13 16:51:17 +00:00
|
|
|
|
|
|
|
|
|
|
|
/* OSD Elements */
|
|
|
|
%osd_panel {
|
|
|
|
color: $osd_fg_color;
|
|
|
|
background-color: $osd_bg_color;
|
|
|
|
border: 1px solid $osd_outer_borders_color;
|
|
|
|
border-radius: 999px;
|
|
|
|
padding: $base_padding*2;
|
|
|
|
|
|
|
|
@if $is_highcontrast {
|
|
|
|
border: 2px solid $hc_inset_color;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// entries
|
|
|
|
%osd_entry {
|
|
|
|
@extend %entry_common;
|
|
|
|
@include entry(normal, $c:$osd_fg_color,);
|
2023-07-05 16:47:57 +00:00
|
|
|
&:hover { @include entry(hover, $c:$osd_fg_color);}
|
|
|
|
&:focus { @include entry(focus, $c:$osd_fg_color);}
|
|
|
|
&:insensitive { @include entry(insensitive, $c:$osd_fg_color);}
|
2022-10-13 16:51:17 +00:00
|
|
|
|
|
|
|
StLabel.hint-text {color: transparentize($osd_fg_color, 0.3); }
|
|
|
|
}
|
|
|
|
|
|
|
|
// buttons on OSD elements
|
|
|
|
%osd_button {
|
|
|
|
@extend %button_common;
|
|
|
|
@include button(normal, $tc:$osd_fg_color, $c:$osd_bg_color);
|
|
|
|
&:insensitive { @include button(insensitive, $tc:$osd_fg_color, $c:$osd_bg_color);}
|
|
|
|
&:focus { @include button(focus, $tc:$osd_fg_color, $c:$osd_bg_color);}
|
|
|
|
&:hover { @include button(hover, $tc:$osd_fg_color, $c:$osd_bg_color);}
|
|
|
|
&:active { @include button(active, $tc:$osd_fg_color, $c:$osd_bg_color);}
|
|
|
|
&:outlined,&:checked { @include button(checked, $tc:$osd_fg_color, $c:$osd_bg_color);}
|
|
|
|
}
|
|
|
|
|
|
|
|
%osd_button_flat {
|
|
|
|
@extend %osd_button;
|
|
|
|
@include button(undecorated);
|
|
|
|
&:insensitive { @include button(undecorated, $tc:$osd_fg_color, $c:$osd_bg_color);}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* System Elements */
|
|
|
|
|
|
|
|
// entries
|
|
|
|
%system_entry {
|
|
|
|
@extend %entry_common;
|
|
|
|
@include entry(normal, $c:$system_fg_color,);
|
2023-07-05 16:47:57 +00:00
|
|
|
&:hover { @include entry(hover, $c:$system_fg_color);}
|
|
|
|
&:focus { @include entry(focus, $c:$system_fg_color, $fc:transparentize($system_fg_color, 0.5));}
|
|
|
|
&:insensitive { @include entry(insensitive, $c:$system_fg_color);}
|
2022-10-13 16:51:17 +00:00
|
|
|
|
|
|
|
StLabel.hint-text { color: transparentize($system_fg_color, 0.3);}
|
|
|
|
}
|
|
|
|
|
2023-07-05 16:47:57 +00:00
|
|
|
|
2022-10-13 16:51:17 +00:00
|
|
|
// buttons
|
|
|
|
%system_button {
|
|
|
|
@include button(normal, $tc:$system_fg_color, $c:$system_bg_color);
|
|
|
|
&:insensitive { @include button(insensitive, $tc:$system_fg_color, $c:$system_bg_color);}
|
|
|
|
&:focus { @include button(focus, $tc:$system_fg_color, $c:$system_bg_color);}
|
|
|
|
&:hover { @include button(hover, $tc:$system_fg_color, $c:$system_bg_color);}
|
|
|
|
&:active { @include button(active, $tc:$system_fg_color, $c:$system_bg_color);}
|
|
|
|
&:outlined,&:checked { @include button(checked, $tc:$system_fg_color, $c:$system_bg_color);}
|
|
|
|
}
|