Commit 4af053d5 authored by Jan Blackquill's avatar Jan Blackquill 🌈

Run formatter

parent 25b81e37
......@@ -269,4 +269,4 @@ these are pretty self explicative */
@define-color warning_color @warning_color_breeze;
@define-color error_color @error_color_breeze;
@define-color success_color @success_color_breeze;
@define-color content_view_bg @content_view_bg_breeze;
\ No newline at end of file
@define-color content_view_bg @content_view_bg_breeze;
......@@ -3,12 +3,12 @@
// GTK functions
// escape string entirely
@function gtk ($str) {
@function gtk($str) {
@return unquote("#{$str}_breeze");
}
// alpha function
@function gtkalpha($c,$a) {
@function gtkalpha($c, $a) {
@return unquote("alpha(#{$c},#{$a})");
}
......@@ -57,7 +57,7 @@
@return $SelectionForegroundNormal;
}
@if $c == backdrop {
@return transparentize($SelectionBackgroundNormal,0.5);
@return transparentize($SelectionBackgroundNormal, 0.5);
}
}
......@@ -120,14 +120,21 @@
@function internal_button_gradient($c, $state: normal) {
@if $state == normal {
@return linear-gradient(to bottom, change-color($c, $lightness: min(lightness($c)*1.01,100%)), change-color($c, $lightness:min(lightness($c)/1.03,100%)));
}
@else {
@return linear-gradient(to bottom, change-color($c, $lightness: min(lightness($c)*1.03,100%)), change-color($c, $lightness:min(lightness($c)/1.10,100%)));
@return linear-gradient(
to bottom,
change-color($c, $lightness: min(lightness($c) * 1.01, 100%)),
change-color($c, $lightness: min(lightness($c) / 1.03, 100%))
);
} @else {
@return linear-gradient(
to bottom,
change-color($c, $lightness: min(lightness($c) * 1.03, 100%)),
change-color($c, $lightness: min(lightness($c) / 1.1, 100%))
);
}
}
$border_color: mix($WindowBackgroundNormal,$WindowForegroundNormal, 75%);
$border_color: mix($WindowBackgroundNormal, $WindowForegroundNormal, 75%);
$menu_color: internal_w_color(normal);
$link_color: $ViewForegroundLink;
$link_visited_color: $ViewForegroundVisited;
......@@ -137,13 +144,29 @@ $error_color: $ViewForegroundNegative;
$success_color: $ViewForegroundPositive;
$destructive_color: $error_color;
$trough_color: gtkmix(gtk("@theme_bg_color"),gtk("@theme_fg_color"),0.7);
$trough_color_backdrop: gtkmix(gtk("@theme_unfocused_bg_color"),gtk("@theme_unfocused_fg_color"),0.7);
$trough_color_insensitive: gtkmix(gtk("@insensitive_bg_color"),gtk("@insensitive_fg_color"),0.7);
$trough_color_backdrop_insensitive: gtkmix(gtk("@insensitive_unfocused_bg_color"),gtk("@insensitive_unfocused_fg_color"),0.7);
$scrollbar_color: gtkmix($trough_color,gtk("@theme_text_color"),0.5);
$scrollbar_color_backdrop: gtkmix($trough_color_backdrop,gtk("@theme_unfocused_text_color"),0.5);
$trough_color: gtkmix(gtk("@theme_bg_color"), gtk("@theme_fg_color"), 0.7);
$trough_color_backdrop: gtkmix(
gtk("@theme_unfocused_bg_color"),
gtk("@theme_unfocused_fg_color"),
0.7
);
$trough_color_insensitive: gtkmix(
gtk("@insensitive_bg_color"),
gtk("@insensitive_fg_color"),
0.7
);
$trough_color_backdrop_insensitive: gtkmix(
gtk("@insensitive_unfocused_bg_color"),
gtk("@insensitive_unfocused_fg_color"),
0.7
);
$scrollbar_color: gtkmix($trough_color, gtk("@theme_text_color"), 0.5);
$scrollbar_color_backdrop: gtkmix(
$trough_color_backdrop,
gtk("@theme_unfocused_text_color"),
0.5
);
//
// Color effects
......@@ -153,87 +176,127 @@ $scrollbar_color_backdrop: gtkmix($trough_color_backdrop,gtk("@theme_unfocused_t
//
$Color: (
Disabled: $DisabledColor,
Inactive: $InactiveColor
);
Inactive: $InactiveColor,
);
$ColorAmount: (
Disabled: $DisabledColorAmount,
Inactive: $InactiveColorAmount
);
Inactive: $InactiveColorAmount,
);
$ColorEffect: (
Disabled: $DisabledColorEffect,
Inactive: $InactiveColorEffect
);
Inactive: $InactiveColorEffect,
);
$ContrastAmount: (
Disabled: $DisabledContrastAmount,
Inactive: $InactiveContrastAmount
);
Inactive: $InactiveContrastAmount,
);
$ContrastEffect: (
Disabled: $DisabledContrastEffect,
Inactive: $InactiveContrastEffect
);
Inactive: $InactiveContrastEffect,
);
$IntensityAmount: (
Disabled: $DisabledIntensityAmount,
Inactive: $InactiveIntensityAmount
);
Inactive: $InactiveIntensityAmount,
);
$IntensityEffect: (
Disabled: $DisabledIntensityEffect,
Inactive: $InactiveIntensityEffect
);
Inactive: $InactiveIntensityEffect,
);
$r: 3px; // standard radius
@function internal_insensitive($c) {
@return internal_Color(internal_Intensity(internal_Contrast($c, Disabled), Disabled), Disabled);
@return internal_Color(
internal_Intensity(internal_Contrast($c, Disabled), Disabled),
Disabled
);
}
@function internal_backdrop($c) {
@if $InactiveEnable == true {
@return internal_Color(internal_Intensity(internal_Contrast($c, Inactive), Inactive), Inactive);
}
@else {
@return internal_Color(
internal_Intensity(internal_Contrast($c, Inactive), Inactive),
Inactive
);
} @else {
@return $c;
}
}
@function internal_Contrast($c, $state) {
@if map-get($ContrastEffect, $state) == 0 {
@return $c;
}
@if map-get($ContrastEffect, $state) == 1 {
@if lightness(internal_w_color()) > lightness(internal_w_color(text)) {
@if lightness($c) < lightness(internal_w_color()) or ($c == internal_t_color(text) and lightness(internal_t_color(background)) <= lightness(internal_t_color(text))) {
@if lightness($c) <
lightness(internal_w_color()) or
(
$c ==
internal_t_color(text) and
lightness(internal_t_color(background)) <=
lightness(internal_t_color(text))
)
{
@return transparentize($c, map-get($ContrastAmount, $state));
} @else {
@return $c;
}
@else { @return $c; }
}
@if lightness(internal_w_color()) <= lightness(internal_w_color(text)) {
@if lightness($c) > lightness(internal_w_color()) or ($c == internal_t_color(text) and lightness(internal_t_color(background)) > lightness(internal_t_color(text))) {
@if lightness($c) >
lightness(internal_w_color()) or
(
$c ==
internal_t_color(text) and
lightness(internal_t_color(background)) >
lightness(internal_t_color(text))
)
{
@return transparentize($c, map-get($ContrastAmount, $state));
} @else {
@return $c;
}
@else { @return $c; }
}
}
@if map-get($ContrastEffect, $state) == 2 {
@if lightness(internal_w_color()) > lightness(internal_w_color(text)) { // don't know what a reasonable lightness treshhold is for Contrast
@if lightness($c) < lightness(internal_w_color()) or ($c == internal_t_color(text) and lightness(internal_t_color(background)) <= lightness(internal_t_color(text))) {
@if lightness(internal_w_color()) > lightness(internal_w_color(text)) {
// don't know what a reasonable lightness treshhold is for Contrast
@if lightness($c) <
lightness(internal_w_color()) or
(
$c ==
internal_t_color(text) and
lightness(internal_t_color(background)) <=
lightness(internal_t_color(text))
)
{
@return transparentize($c, map-get($ContrastAmount, $state));
} @else {
@return $c;
}
@else { @return $c; }
}
@if lightness(internal_w_color()) <= lightness(internal_w_color(text)) {
@if lightness($c) > lightness(internal_w_color()) or ($c == internal_t_color(text) and lightness(internal_t_color(background)) > lightness(internal_t_color(text))){
@if lightness($c) >
lightness(internal_w_color()) or
(
$c ==
internal_t_color(text) and
lightness(internal_t_color(background)) >
lightness(internal_t_color(text))
)
{
@return transparentize($c, map-get($ContrastAmount, $state));
} @else {
@return $c;
}
@else { @return $c; }
}
}
}
@function internal_Color($c, $state) {
@if map-get($ColorEffect, $state) ==0 {
@return $c;
}
......@@ -241,47 +304,60 @@ $r: 3px; // standard radius
@if map-get($ColorEffect, $state) ==1 {
@if map-get($ColorAmount, $state) >=0 {
@return desaturate($c, percentage(map-get($ColorAmount, $state)));
}
@else {
} @else {
@return saturate($c, percentage(abs(map-get($ColorAmount, $state))));
}
}
@if map-get($ColorEffect, $state)==2 or map-get($ColorEffect, $state)==3 { // 2 and 3 seem to do the same
@return mix(map-get($Color, $state),$c, percentage(map-get($ColorAmount, $state)));
@if map-get($ColorEffect, $state) ==2 or map-get($ColorEffect, $state) ==3 {
// 2 and 3 seem to do the same
@return mix(
map-get($Color, $state),
$c,
percentage(map-get($ColorAmount, $state))
);
}
}
@function internal_Intensity($c, $state) {
@if map-get($IntensityEffect, $state) == 0 {
@return $c;
}
@if map-get($IntensityEffect, $state) == 1 {
@if map-get($IntensityAmount, $state) >= 0 {
@return mix(white, $c, percentage(map-get($IntensityAmount, $state)));
}
@else {
@return mix(black, $c, percentage(abs(map-get($IntensityAmount, $state))));
} @else {
@return mix(
black,
$c,
percentage(abs(map-get($IntensityAmount, $state)))
);
}
}
@if map-get($IntensityEffect, $state) == 2 {
@if map-get($IntensityAmount, $state) == -1 {
@return change-color($c, $lightness: 100%);
}
@else {
@return change-color($c, $lightness: min(lightness($c)/(1+map-get($IntensityAmount, $state)),100%));
} @else {
@return change-color(
$c,
$lightness:
min(lightness($c) / (1 + map-get($IntensityAmount, $state)), 100%)
);
}
}
@if map-get($IntensityEffect, $state) == 3 {
@return change-color($c, $lightness: min(lightness($c)*(1+map-get($IntensityAmount, $state)),100%));
@return change-color(
$c,
$lightness:
min(lightness($c) * (1 + map-get($IntensityAmount, $state)), 100%)
);
}
}
@function internal_alpha2solid($c,$background) {
$amount:alpha($c);
$c:rgb(red($c),green($c),blue($c));
@return mix($c,$background,$amount);
@function internal_alpha2solid($c, $background) {
$amount: alpha($c);
$c: rgb(red($c), green($c), blue($c));
@return mix($c, $background, $amount);
}
@import url("../../Breeze-Dark/gtk-3.0/gtk.css");
\ No newline at end of file
@import url("../../Breeze-Dark/gtk-3.0/gtk.css");
window.background.chromium {
background-color: gtk("@theme_base_color");
border-color: gtk("@borders");
menubar,
.menubar {
color: gtk("@theme_fg_color");
background-color: gtk("@theme_bg_color");
&:backdrop {
background-color: gtk("@theme_unfocused_bg_color");
color: gtk("@theme_unfocused_fg_color");
}
}
entry {
background-color: gtk("@theme_base_color");
border-color: gtk("@borders");
menubar, .menubar {
color: gtk("@theme_fg_color");
background-color: gtk("@theme_bg_color");
}
&.csd {
menubar,
.menubar {
color: gtk("@theme_titlebar_foreground");
background-color: gtk("@theme_titlebar_background");
&:backdrop {
background-color: gtk("@theme_titlebar_background_backdrop");
color: gtk("@theme_titlebar_foreground_backdrop");
}
}
}
headerbar,
.titlebar {
button.titlebutton {
&.close {
color: transparent;
background-image: -gtk-scaled(
url("../assets/titlebutton-close.png"),
url("../assets/titlebutton-close@2.png")
);
&:hover {
background-image: -gtk-scaled(
url("../assets/titlebutton-close-hover.png"),
url("../assets/titlebutton-close-hover@2.png")
);
}
&:active {
background-image: -gtk-scaled(
url("../assets/titlebutton-close-active.png"),
url("../assets/titlebutton-close-active@2.png")
);
}
&:backdrop {
background-color: gtk("@theme_unfocused_bg_color");
color: gtk("@theme_unfocused_fg_color");
background-image: -gtk-scaled(
url("../assets/titlebutton-close-backdrop.png"),
url("../assets/titlebutton-close-backdrop@2.png")
);
}
}
entry {
background-color: gtk("@theme_base_color");
}
&.csd {
menubar, .menubar {
color: gtk("@theme_titlebar_foreground");
background-color: gtk("@theme_titlebar_background");
&:backdrop {
background-color: gtk("@theme_titlebar_background_backdrop");
color: gtk("@theme_titlebar_foreground_backdrop");
}
}
&.maximize {
color: transparent;
background-image: -gtk-scaled(
url("../assets/titlebutton-maximize.png"),
url("../assets/titlebutton-maximize@2.png")
);
&:hover {
background-image: -gtk-scaled(
url("../assets/titlebutton-maximize-hover.png"),
url("../assets/titlebutton-maximize-hover@2.png")
);
}
}
headerbar,
.titlebar {
button.titlebutton {
&.close {
color: transparent;
background-image: -gtk-scaled(url('../assets/titlebutton-close.png'),url('../assets/titlebutton-close@2.png'));
&:hover {
background-image: -gtk-scaled(url('../assets/titlebutton-close-hover.png'),url('../assets/titlebutton-close-hover@2.png'));
}
&:active {
background-image: -gtk-scaled(url('../assets/titlebutton-close-active.png'),url('../assets/titlebutton-close-active@2.png'));
}
&:backdrop {
background-image: -gtk-scaled(url('../assets/titlebutton-close-backdrop.png'),url('../assets/titlebutton-close-backdrop@2.png'));
}
&:active {
background-image: -gtk-scaled(
url("../assets/titlebutton-maximize-active.png"),
url("../assets/titlebutton-maximize-active@2.png")
);
}
&:backdrop {
background-image: -gtk-scaled(
url("../assets/titlebutton-maximize-backdrop.png"),
url("../assets/titlebutton-maximize-backdrop@2.png")
);
}
}
&.minimize {
color: transparent;
background-image: -gtk-scaled(
url("../assets/titlebutton-minimize.png"),
url("../assets/titlebutton-minimize@2.png")
);
&:hover {
background-image: -gtk-scaled(
url("../assets/titlebutton-minimize-hover.png"),
url("../assets/titlebutton-minimize-hover@2.png")
);
}
&:active {
background-image: -gtk-scaled(
url("../assets/titlebutton-minimize-active.png"),
url("../assets/titlebutton-minimize-active@2.png")
);
}
&:backdrop {
background-image: -gtk-scaled(
url("../assets/titlebutton-minimize-backdrop.png"),
url("../assets/titlebutton-minimize-backdrop@2.png")
);
}
}
}
@at-root window.background.chromium.maximized headerbar,
.maximized .titlebar {
button.titlebutton {
&.maximize {
color: transparent;
background-image: -gtk-scaled(url('../assets/titlebutton-maximize.png'),url('../assets/titlebutton-maximize@2.png'));
background-image: -gtk-scaled(
url("../assets/titlebutton-maximize-maximized.png"),
url("../assets/titlebutton-maximize-maximized@2.png")
);
&:hover {
background-image: -gtk-scaled(url('../assets/titlebutton-maximize-hover.png'),url('../assets/titlebutton-maximize-hover@2.png'));
background-image: -gtk-scaled(
url("../assets/titlebutton-maximize-maximized-hover.png"),
url("../assets/titlebutton-maximize-maximized-hover@2.png")
);
}
&:active {
background-image: -gtk-scaled(url('../assets/titlebutton-maximize-active.png'),url('../assets/titlebutton-maximize-active@2.png'));
background-image: -gtk-scaled(
url("../assets/titlebutton-maximize-maximized-active.png"),
url("../assets/titlebutton-maximize-maximized-active@2.png")
);
}
&:backdrop {
background-image: -gtk-scaled(url('../assets/titlebutton-maximize-backdrop.png'),url('../assets/titlebutton-maximize-backdrop@2.png'));
}
}
&.minimize {
color: transparent;
background-image: -gtk-scaled(url('../assets/titlebutton-minimize.png'),url('../assets/titlebutton-minimize@2.png'));
&:hover {
background-image: -gtk-scaled(url('../assets/titlebutton-minimize-hover.png'),url('../assets/titlebutton-minimize-hover@2.png'));
}
&:active {
background-image: -gtk-scaled(url('../assets/titlebutton-minimize-active.png'),url('../assets/titlebutton-minimize-active@2.png'));
}
&:backdrop {
background-image: -gtk-scaled(url('../assets/titlebutton-minimize-backdrop.png'),url('../assets/titlebutton-minimize-backdrop@2.png'));
}
}
}
@at-root window.background.chromium.maximized headerbar, .maximized .titlebar {
button.titlebutton {
&.maximize {
color: transparent;
background-image: -gtk-scaled(url('../assets/titlebutton-maximize-maximized.png'),url('../assets/titlebutton-maximize-maximized@2.png'));
&:hover {
background-image: -gtk-scaled(url('../assets/titlebutton-maximize-maximized-hover.png'),url('../assets/titlebutton-maximize-maximized-hover@2.png'));
}
&:active {
background-image: -gtk-scaled(url('../assets/titlebutton-maximize-maximized-active.png'),url('../assets/titlebutton-maximize-maximized-active@2.png'));
}
&:backdrop {
background-image: -gtk-scaled(url('../assets/titlebutton-maximize-maximized-backdrop.png'),url('../assets/titlebutton-maximize-maximized-backdrop@2.png'));
}
background-image: -gtk-scaled(
url("../assets/titlebutton-maximize-maximized-backdrop.png"),
url("../assets/titlebutton-maximize-maximized-backdrop@2.png")
);
}
}
}
}
}
}
#MozillaGtkWidget {
scrollbar {
margin: 0px;
slider {
border: 5px solid transparent;
}
scrollbar {
margin: 0px;
slider {
border: 5px solid transparent;
}
}
\ No newline at end of file
}
}
......@@ -2,9 +2,9 @@
$new-highlight: false;
@import 'global';
@import '../functions';
@import '../colors';
@import "global";
@import "../functions";
@import "../colors";
@import "widgets/base";
@import "widgets/button";
......
......@@ -10,7 +10,9 @@
padding: 10px;
border-top-width: 0px;
border-radius: 0px 0px 3px 3px;
&:backdrop { background-image: none; }
&:backdrop {
background-image: none;
}
button {
@include button(normal);
&.flat {
......@@ -27,9 +29,13 @@
}
&:backdrop,
&:disabled,
&:backdrop:disabled { @extend %undecorated_button; }
&:backdrop:disabled {
@extend %undecorated_button;
}
}
&:hover {
@include button(hover);
}
&:hover { @include button(hover); }
&:active,
&:checked,
&:backdrop:active,
......@@ -37,10 +43,14 @@
@include button(active);
}
&:disabled,
&:backdrop:disabled{
&:backdrop:disabled {
@include button(insensitive);