| 1 |
@charset "UTF-8"; |
| 2 |
|
| 3 |
/***************** |
| 4 |
* Color Chooser * |
| 5 |
*****************/ |
| 6 |
// FIXME button.color in buttons section |
| 7 |
colorswatch { |
| 8 |
// take care of colorswatches on selected elements |
| 9 |
:selected & { |
| 10 |
box-shadow: none; |
| 11 |
&.overlay, |
| 12 |
&.overlay:hover { |
| 13 |
border-color: gtk("@theme_selected_fg_color"); |
| 14 |
} |
| 15 |
} |
| 16 |
|
| 17 |
&:selected { |
| 18 |
box-shadow: none; |
| 19 |
} |
| 20 |
|
| 21 |
&.top, |
| 22 |
&.bottom, |
| 23 |
&.left, |
| 24 |
&:first-child:not(.overlay):not(.top), |
| 25 |
&.right, |
| 26 |
&:last-child:not(.overlay):not(.bottom), |
| 27 |
&:only-child:not(.overlay), |
| 28 |
&.top > .overlay, |
| 29 |
&.bottom > .overlay, |
| 30 |
&:first-child:not(.top) > .overlay, |
| 31 |
&:last-child:not(.bottom) > .overlay, |
| 32 |
&:only-child > .overlay { |
| 33 |
border-radius: $r; |
| 34 |
} |
| 35 |
|
| 36 |
// hover effect |
| 37 |
&:hover, |
| 38 |
&:hover:selected { |
| 39 |
background-image: linear-gradient( |
| 40 |
135deg, |
| 41 |
transparentize(white, 0.3), |
| 42 |
transparentize(white, 1) 50% |
| 43 |
); |
| 44 |
box-shadow: inset 0 1px transparentize(white, 0.6); |
| 45 |
&.color-dark { |
| 46 |
// swatches with colors with luminosity lower than 50% get the color-dark class |
| 47 |
background-image: linear-gradient( |
| 48 |
135deg, |
| 49 |
transparentize(white, 0.5), |
| 50 |
transparentize(white, 1) 50% |
| 51 |
); |
| 52 |
} |
| 53 |
} |
| 54 |
&:backdrop, |
| 55 |
&:backdrop:selected &.color-dark:backdrop, |
| 56 |
&.color-dark:backdrop:selected { |
| 57 |
background-image: none; |
| 58 |
box-shadow: none; |
| 59 |
} |
| 60 |
|
| 61 |
// no hover effect for the colorswatch in the color editor |
| 62 |
GtkColorEditor & { |
| 63 |
border-radius: $r; // same radius as the entry |
| 64 |
&:hover { |
| 65 |
background-image: none; |
| 66 |
box-shadow: none; |
| 67 |
} |
| 68 |
&:backdrop { |
| 69 |
box-shadow: none; |
| 70 |
} |
| 71 |
} |
| 72 |
|
| 73 |
// indicator and keynav outline colors |
| 74 |
&.color-dark { |
| 75 |
color: white; |
| 76 |
outline-color: transparentize(black, 0.7); |
| 77 |
&:backdrop { |
| 78 |
color: transparentize(white, 0.7); |
| 79 |
} |
| 80 |
} |
| 81 |
&.color-light { |
| 82 |
color: black; |
| 83 |
outline-color: transparentize(white, 0.5); |
| 84 |
&:backdrop { |
| 85 |
color: transparentize(black, 0.7); |
| 86 |
} |
| 87 |
} |
| 88 |
|
| 89 |
// border color |
| 90 |
overlay, |
| 91 |
overlay:selected { |
| 92 |
border: 1px solid gtk("@borders"); |
| 93 |
&:hover { |
| 94 |
border-color: gtk("@theme_button_decoration_hover"); |
| 95 |
} |
| 96 |
} |
| 97 |
|
| 98 |
// make the add color button looks like, well, a button |
| 99 |
&#add-color-button { |
| 100 |
border-style: solid; // the borders are drawn by the overlay for standard colorswatches to have them semi |
| 101 |
border-width: 1px; // translucent on the colored background, here it's not necessary so they need to be set |
| 102 |
@include neobutton(normal); |
| 103 |
overlay { |
| 104 |
@include neobutton(toolbutton); |
| 105 |
} // reset the overlay to not cover the button style underneat |
| 106 |
} |
| 107 |
} |
| 108 |
|
| 109 |
GtkColorButton.button { |
| 110 |
padding: 5px; // Uniform padding on the GtkColorButton |
| 111 |
|
| 112 |
GtkColorSwatch:first-child:last-child { |
| 113 |
// :first-child:last-child for a specificity bump, it gets overridden by the |
| 114 |
// colorpicker style, otherwise |
| 115 |
border-radius: 0; |
| 116 |
box-shadow: none; |
| 117 |
&:disabled, |
| 118 |
&:backdrop { |
| 119 |
box-shadow: none; |
| 120 |
} |
| 121 |
} |
| 122 |
} |