| 1 |
@function gtkalpha($c,$a) { |
| 2 |
@return unquote("alpha(#{$c},#{$a})"); |
| 3 |
} |
| 4 |
|
| 5 |
/*********** |
| 6 |
* Palette * |
| 7 |
***********/ |
| 8 |
|
| 9 |
$blue_1: #99c1f1; |
| 10 |
$blue_2: #62a0ea; |
| 11 |
$blue_3: #3584e4; |
| 12 |
$blue_4: #1c71d8; |
| 13 |
$blue_5: #1a5fb4; |
| 14 |
$green_1: #8ff0a4; |
| 15 |
$green_2: #57e389; |
| 16 |
$green_3: #33d17a; |
| 17 |
$green_4: #2ec27e; |
| 18 |
$green_5: #26a269; |
| 19 |
$yellow_1: #f9f06b; |
| 20 |
$yellow_2: #f8e45c; |
| 21 |
$yellow_3: #f6d32d; |
| 22 |
$yellow_4: #f5c211; |
| 23 |
$yellow_5: #e5a50a; |
| 24 |
$orange_1: #ffbe6f; |
| 25 |
$orange_2: #ffa348; |
| 26 |
$orange_3: #ff7800; |
| 27 |
$orange_4: #e66100; |
| 28 |
$orange_5: #c64600; |
| 29 |
$red_1: #f66151; |
| 30 |
$red_2: #ed333b; |
| 31 |
$red_3: #e01b24; |
| 32 |
$red_4: #c01c28; |
| 33 |
$red_5: #a51d2d; |
| 34 |
$purple_1: #dc8add; |
| 35 |
$purple_2: #c061cb; |
| 36 |
$purple_3: #9141ac; |
| 37 |
$purple_4: #813d9c; |
| 38 |
$purple_5: #613583; |
| 39 |
$brown_1: #cdab8f; |
| 40 |
$brown_2: #b5835a; |
| 41 |
$brown_3: #986a44; |
| 42 |
$brown_4: #865e3c; |
| 43 |
$brown_5: #63452c; |
| 44 |
$light_1: #ffffff; |
| 45 |
$light_2: #f6f5f4; |
| 46 |
$light_3: #deddda; |
| 47 |
$light_4: #c0bfbc; |
| 48 |
$light_5: #9a9996; |
| 49 |
$dark_1: #77767b; |
| 50 |
$dark_2: #5e5c64; |
| 51 |
$dark_3: #3d3846; |
| 52 |
$dark_4: #241f31; |
| 53 |
$dark_5: #000000; |
| 54 |
|
| 55 |
// Sass thinks we're using the colors in the variables as strings and may shoot |
| 56 |
// warning, it's innocuous and can be defeated by using #{$var}. |
| 57 |
|
| 58 |
@define-color blue_1 #{$blue_1}; |
| 59 |
@define-color blue_2 #{$blue_2}; |
| 60 |
@define-color blue_3 #{$blue_3}; |
| 61 |
@define-color blue_4 #{$blue_4}; |
| 62 |
@define-color blue_5 #{$blue_5}; |
| 63 |
@define-color green_1 #{$green_1}; |
| 64 |
@define-color green_2 #{$green_2}; |
| 65 |
@define-color green_3 #{$green_3}; |
| 66 |
@define-color green_4 #{$green_4}; |
| 67 |
@define-color green_5 #{$green_5}; |
| 68 |
@define-color yellow_1 #{$yellow_1}; |
| 69 |
@define-color yellow_2 #{$yellow_2}; |
| 70 |
@define-color yellow_3 #{$yellow_3}; |
| 71 |
@define-color yellow_4 #{$yellow_4}; |
| 72 |
@define-color yellow_5 #{$yellow_5}; |
| 73 |
@define-color orange_1 #{$orange_1}; |
| 74 |
@define-color orange_2 #{$orange_2}; |
| 75 |
@define-color orange_3 #{$orange_3}; |
| 76 |
@define-color orange_4 #{$orange_4}; |
| 77 |
@define-color orange_5 #{$orange_5}; |
| 78 |
@define-color red_1 #{$red_1}; |
| 79 |
@define-color red_2 #{$red_2}; |
| 80 |
@define-color red_3 #{$red_3}; |
| 81 |
@define-color red_4 #{$red_4}; |
| 82 |
@define-color red_5 #{$red_5}; |
| 83 |
@define-color purple_1 #{$purple_1}; |
| 84 |
@define-color purple_2 #{$purple_2}; |
| 85 |
@define-color purple_3 #{$purple_3}; |
| 86 |
@define-color purple_4 #{$purple_4}; |
| 87 |
@define-color purple_5 #{$purple_5}; |
| 88 |
@define-color brown_1 #{$brown_1}; |
| 89 |
@define-color brown_2 #{$brown_2}; |
| 90 |
@define-color brown_3 #{$brown_3}; |
| 91 |
@define-color brown_4 #{$brown_4}; |
| 92 |
@define-color brown_5 #{$brown_5}; |
| 93 |
@define-color light_1 #{$light_1}; |
| 94 |
@define-color light_2 #{$light_2}; |
| 95 |
@define-color light_3 #{$light_3}; |
| 96 |
@define-color light_4 #{$light_4}; |
| 97 |
@define-color light_5 #{$light_5}; |
| 98 |
@define-color dark_1 #{$dark_1}; |
| 99 |
@define-color dark_2 #{$dark_2}; |
| 100 |
@define-color dark_3 #{$dark_3}; |
| 101 |
@define-color dark_4 #{$dark_4}; |
| 102 |
@define-color dark_5 #{$dark_5}; |
| 103 |
|
| 104 |
/********** |
| 105 |
* Avatar * |
| 106 |
**********/ |
| 107 |
|
| 108 |
avatar { |
| 109 |
border-radius: 9999px; |
| 110 |
font-weight: bold; |
| 111 |
|
| 112 |
// The list of colors to generate avatars. |
| 113 |
// Each avatar color is represented by a font color, a gradient start color and a gradient stop color. |
| 114 |
// There are 8 different colors for avtars in the list if you change the number of them you |
| 115 |
// need to update the NUMBER_OF_COLORS in src/adw-avatar.c. |
| 116 |
// The 2D list has this form: ((font-color, gradient-top-color, gradient-bottom-color)). |
| 117 |
$avatarcolorlist: ( |
| 118 |
(#cfe1f5, #83b6ec, #337fdc), // blue |
| 119 |
(#caeaf2, #7ad9f1, #0f9ac8), // cyan |
| 120 |
(#cef8d8, #8de6b1, #29ae74), // green |
| 121 |
(#e6f9d7, #b5e98a, #6ab85b), // lime |
| 122 |
(#f9f4e1, #f8e359, #d29d09), // yellow |
| 123 |
(#ffead1, #ffcb62, #d68400), // gold |
| 124 |
(#ffe5c5, #ffa95a, #ed5b00), // orange |
| 125 |
(#f8d2ce, #f78773, #e62d42), // raspberry |
| 126 |
(#fac7de, #e973ab, #e33b6a), // magenta |
| 127 |
(#e7c2e8, #cb78d4, #9945b5), // purple |
| 128 |
(#d5d2f5, #9e91e8, #7a59ca), // violet |
| 129 |
(#f2eade, #e3cf9c, #b08952), // beige |
| 130 |
(#e5d6ca, #be916d, #785336), // brown |
| 131 |
(#d8d7d3, #c0bfbc, #6e6d71), // gray |
| 132 |
); |
| 133 |
|
| 134 |
@for $i from 1 through length($avatarcolorlist) { |
| 135 |
&.color#{$i} { |
| 136 |
$avatarcolor: nth($avatarcolorlist, $i); |
| 137 |
background-color: nth($avatarcolor, 3); |
| 138 |
color: white; |
| 139 |
} |
| 140 |
} |
| 141 |
|
| 142 |
&.contrasted { color: white; } |
| 143 |
|
| 144 |
&.image { background: none; } |
| 145 |
} |
| 146 |
|
| 147 |
/*********** |
| 148 |
* Buttons * |
| 149 |
***********/ |
| 150 |
|
| 151 |
button { |
| 152 |
&.image-text-button { |
| 153 |
@extend %image_text_button; |
| 154 |
} |
| 155 |
|
| 156 |
%opaque_button, |
| 157 |
&.opaque { |
| 158 |
@include button(suggested_destructive, $button_bg, $fg_color); |
| 159 |
@include focus-ring(); |
| 160 |
|
| 161 |
// opaque buttons don't have border |
| 162 |
// workaround by extending background to border area |
| 163 |
border: 1px solid transparent; |
| 164 |
background-clip: border-box; |
| 165 |
|
| 166 |
&.flat { |
| 167 |
@include button(undecorated); |
| 168 |
|
| 169 |
color: $fg_color; |
| 170 |
} |
| 171 |
|
| 172 |
&:hover { |
| 173 |
background-image: image(gtkalpha(currentColor, .25)); |
| 174 |
} |
| 175 |
|
| 176 |
&.keyboard-activating, |
| 177 |
&:active { |
| 178 |
background-image: image(transparentize(black, .9)); |
| 179 |
} |
| 180 |
|
| 181 |
&:checked { |
| 182 |
background-image: image(transparentize(black, .9)); |
| 183 |
|
| 184 |
&:hover { |
| 185 |
background-image: image(transparentize(black, .95)); |
| 186 |
} |
| 187 |
|
| 188 |
&.keyboard-activating, |
| 189 |
&:active { |
| 190 |
background-image: image(transparentize(black, .8)); |
| 191 |
} |
| 192 |
} |
| 193 |
|
| 194 |
|
| 195 |
&.flat { |
| 196 |
&:disabled { |
| 197 |
@include button(undecorated); |
| 198 |
|
| 199 |
color: $insensitive_fg_color; |
| 200 |
} |
| 201 |
} |
| 202 |
|
| 203 |
&:disabled { |
| 204 |
@include button(insensitive); |
| 205 |
|
| 206 |
&:active, |
| 207 |
&:checked { @include button(insensitive-active); } |
| 208 |
} |
| 209 |
|
| 210 |
.osd & { |
| 211 |
@include button(osd); |
| 212 |
|
| 213 |
&:hover { @include button(osd-hover); } |
| 214 |
|
| 215 |
&:active, |
| 216 |
&:checked { @include button(osd-active); } |
| 217 |
|
| 218 |
&:disabled { @include button(osd-insensitive); } |
| 219 |
} |
| 220 |
} |
| 221 |
|
| 222 |
@at-root %pill_button, |
| 223 |
&.pill { |
| 224 |
border-radius: 9999px; |
| 225 |
} |
| 226 |
} |
| 227 |
|
| 228 |
menubutton { |
| 229 |
&.circular > button { @extend %circular_button; } |
| 230 |
&.flat > button { @extend %button_basic_flat; } |
| 231 |
&.pill > button { @extend %pill_button; } |
| 232 |
|
| 233 |
&.opaque { |
| 234 |
background-color: $button_bg; |
| 235 |
color: $fg_color; |
| 236 |
|
| 237 |
&.circular, &.pill { |
| 238 |
border-radius: 9999px; |
| 239 |
} |
| 240 |
|
| 241 |
> button { |
| 242 |
@extend %opaque_button; |
| 243 |
|
| 244 |
&, &:checked { |
| 245 |
background-color: transparent; |
| 246 |
color: inherit; |
| 247 |
} |
| 248 |
} |
| 249 |
} |
| 250 |
} |
| 251 |
|
| 252 |
splitbutton { |
| 253 |
> separator { |
| 254 |
min-height: 0; |
| 255 |
min-width: 0; |
| 256 |
} |
| 257 |
|
| 258 |
// Since the inner button doesn't have any style classes on it, |
| 259 |
// we have to add them manually |
| 260 |
&.image-button > button { |
| 261 |
min-width: 24px; |
| 262 |
padding-left: 5px; |
| 263 |
padding-right: 5px; |
| 264 |
} |
| 265 |
|
| 266 |
&.text-button.image-button > button, |
| 267 |
&.image-text-button > button { |
| 268 |
padding-left: 5px; |
| 269 |
padding-right: 5px; |
| 270 |
|
| 271 |
> box { |
| 272 |
border-spacing: 5px; |
| 273 |
} |
| 274 |
} |
| 275 |
|
| 276 |
> button:dir(ltr), |
| 277 |
> menubutton > button:dir(rtl) { |
| 278 |
border-right-style: none; |
| 279 |
border-top-right-radius: 0; |
| 280 |
border-bottom-right-radius: 0; |
| 281 |
} |
| 282 |
|
| 283 |
> button:dir(rtl), |
| 284 |
> menubutton > button:dir(ltr) { |
| 285 |
border-left-style: none; |
| 286 |
border-top-left-radius: 0; |
| 287 |
border-bottom-left-radius: 0; |
| 288 |
} |
| 289 |
|
| 290 |
> menubutton > button:hover:not(:active):dir(ltr), |
| 291 |
> button:hover:not(:active):dir(ltr) + separator + menubutton > button { box-shadow: inset 1px 0 $button_border; } |
| 292 |
|
| 293 |
> menubutton > button:hover:not(:active):dir(rtl), |
| 294 |
> button:hover:not(:active):dir(rtl) + separator + menubutton > button { box-shadow: inset -1px 0 $button_border; } |
| 295 |
|
| 296 |
&.flat { |
| 297 |
> button, |
| 298 |
> menubutton > button { |
| 299 |
@include button(undecorated); |
| 300 |
} |
| 301 |
|
| 302 |
&:hover, |
| 303 |
&:active, |
| 304 |
&:checked { |
| 305 |
> button, |
| 306 |
> menubutton > button { |
| 307 |
@include button(normal); |
| 308 |
transition: $button_transition; |
| 309 |
|
| 310 |
&:hover { |
| 311 |
@include button(hover); |
| 312 |
transition: $button_transition; |
| 313 |
transition-duration: 500ms; |
| 314 |
} |
| 315 |
|
| 316 |
&:active, |
| 317 |
&:checked { |
| 318 |
@include button(active); |
| 319 |
transition: $button_transition; |
| 320 |
} |
| 321 |
} |
| 322 |
} |
| 323 |
} |
| 324 |
|
| 325 |
&.suggested-action { |
| 326 |
@include button(suggested_destructive, $suggested_color, $suggested_fg_color); |
| 327 |
} |
| 328 |
|
| 329 |
&.destructive-action { |
| 330 |
@include button(suggested_destructive, $destructive_color, $destructive_fg_color); |
| 331 |
} |
| 332 |
|
| 333 |
&.opaque { |
| 334 |
@include button(suggested_destructive, $button_bg, $fg_color); |
| 335 |
} |
| 336 |
|
| 337 |
&.suggested-action, |
| 338 |
&.destructive-action, |
| 339 |
&.opaque { |
| 340 |
> button, > menubutton > button { |
| 341 |
@extend %opaque_button; |
| 342 |
|
| 343 |
&, &:checked { |
| 344 |
color: inherit; |
| 345 |
background-color: transparent; |
| 346 |
} |
| 347 |
} |
| 348 |
|
| 349 |
$_separator_color: gtkalpha(currentColor, 0.55); |
| 350 |
> menubutton > button { |
| 351 |
&:dir(ltr) { box-shadow: inset 1px 0 $_separator_color; } |
| 352 |
&:dir(rtl) { box-shadow: inset -1px 0 $_separator_color; } |
| 353 |
} |
| 354 |
} |
| 355 |
|
| 356 |
> menubutton > button > arrow.none { |
| 357 |
-gtk-icon-source: -gtk-icontheme('pan-down-symbolic'); |
| 358 |
} |
| 359 |
} |
| 360 |
|
| 361 |
buttoncontent { |
| 362 |
border-spacing: 5px; |
| 363 |
|
| 364 |
> label { |
| 365 |
&:dir(ltr) { padding-right: 7px; } |
| 366 |
&:dir(rtl) { padding-left: 7px; } |
| 367 |
} |
| 368 |
|
| 369 |
.arrow-button > box > &, |
| 370 |
splitbutton > button > & { |
| 371 |
> label { |
| 372 |
&:dir(ltr) { padding-right: 0; } |
| 373 |
&:dir(rtl) { padding-left: 0; } |
| 374 |
} |
| 375 |
} |
| 376 |
} |
| 377 |
|
| 378 |
/*************************** |
| 379 |
* Selection mode checkbox * |
| 380 |
***************************/ |
| 381 |
|
| 382 |
checkbutton.selection-mode check { |
| 383 |
-gtk-icon-size: 40px; |
| 384 |
-gtk-icon-source: -gtk-scaled(url("assets/checkbox-selectionmode#{$asset_suffix}.png"), |
| 385 |
url("assets/checkbox-selectionmode#{$asset_suffix}@2.png")); |
| 386 |
|
| 387 |
&:checked { |
| 388 |
-gtk-icon-source: -gtk-scaled(url("assets/checkbox-checked-selectionmode#{$asset_suffix}.png"), |
| 389 |
url("assets/checkbox-checked-selectionmode#{$asset_suffix}@2.png")); |
| 390 |
} |
| 391 |
} |
| 392 |
|
| 393 |
/****************** |
| 394 |
* Flat headerbar * |
| 395 |
******************/ |
| 396 |
|
| 397 |
//FIXME Needs full restyle for headerbar widgets |
| 398 |
headerbar.flat { |
| 399 |
background: none; |
| 400 |
box-shadow: none; |
| 401 |
border-bottom-width: 0; |
| 402 |
color: inherit; |
| 403 |
} |
| 404 |
|
| 405 |
/****************** |
| 406 |
* AdwWindowTitle * |
| 407 |
******************/ |
| 408 |
|
| 409 |
headerbar, |
| 410 |
windowtitle { |
| 411 |
.title { |
| 412 |
padding-left: 12px; |
| 413 |
padding-right: 12px; |
| 414 |
font-weight: normal; |
| 415 |
} |
| 416 |
|
| 417 |
.subtitle { |
| 418 |
font-size: smaller; |
| 419 |
padding-left: 12px; |
| 420 |
padding-right: 12px; |
| 421 |
@extend .dim-label; |
| 422 |
} |
| 423 |
} |
| 424 |
|
| 425 |
/********** |
| 426 |
* Labels * |
| 427 |
**********/ |
| 428 |
|
| 429 |
.accent { |
| 430 |
color: $suggested_color; |
| 431 |
} |
| 432 |
|
| 433 |
.success { |
| 434 |
color: $success_color; |
| 435 |
} |
| 436 |
|
| 437 |
.warning { |
| 438 |
color: $warning_color; |
| 439 |
} |
| 440 |
|
| 441 |
.error { |
| 442 |
color: $error_color; |
| 443 |
} |
| 444 |
|
| 445 |
/**************** |
| 446 |
* AdwActionRow * |
| 447 |
****************/ |
| 448 |
|
| 449 |
row { |
| 450 |
label.subtitle { |
| 451 |
font-size: smaller; |
| 452 |
@extend .dim-label; |
| 453 |
} |
| 454 |
|
| 455 |
> box.header { |
| 456 |
margin-left: 10px; |
| 457 |
margin-right: 10px; |
| 458 |
min-height: 50px; |
| 459 |
|
| 460 |
> .icon:disabled { |
| 461 |
color: $insensitive_fg_color; |
| 462 |
} |
| 463 |
|
| 464 |
> box.title { |
| 465 |
margin-top: 5px; |
| 466 |
margin-bottom: 5px; |
| 467 |
border-spacing: 3px; |
| 468 |
} |
| 469 |
} |
| 470 |
} |
| 471 |
|
| 472 |
/*************** |
| 473 |
* AdwComboRow * |
| 474 |
***************/ |
| 475 |
|
| 476 |
row.combo { |
| 477 |
image.dropdown-arrow:disabled { |
| 478 |
color: $insensitive_fg_color; |
| 479 |
} |
| 480 |
|
| 481 |
listview.inline { |
| 482 |
background: none; |
| 483 |
border: none; |
| 484 |
box-shadow: none; |
| 485 |
color: inherit; |
| 486 |
|
| 487 |
&, &:disabled { |
| 488 |
background: none; |
| 489 |
color: inherit; |
| 490 |
} |
| 491 |
} |
| 492 |
|
| 493 |
popover > contents { |
| 494 |
min-width: 120px; |
| 495 |
} |
| 496 |
} |
| 497 |
|
| 498 |
/****************** |
| 499 |
* AdwExpanderRow * |
| 500 |
******************/ |
| 501 |
|
| 502 |
@mixin margin-start($margin) { |
| 503 |
&:dir(ltr) { |
| 504 |
margin-left: $margin; |
| 505 |
} |
| 506 |
|
| 507 |
&:dir(rtl) { |
| 508 |
margin-right: $margin; |
| 509 |
} |
| 510 |
} |
| 511 |
|
| 512 |
%boxed_list_row { |
| 513 |
@include focus-ring(); |
| 514 |
|
| 515 |
border: 1px solid $borders_color; |
| 516 |
border-bottom-width: 0; |
| 517 |
transition: 200ms $ease-out-quad; |
| 518 |
|
| 519 |
&:not(:selected).activatable { |
| 520 |
&:hover { |
| 521 |
background-color: if($variant != 'dark', mix($base_color, black, 95%), mix($base_color, white, 97%)); |
| 522 |
} |
| 523 |
|
| 524 |
&:active { |
| 525 |
background-color: mix($bg_color, $base_color); |
| 526 |
} |
| 527 |
} |
| 528 |
} |
| 529 |
|
| 530 |
row.expander { |
| 531 |
// Drop transparent background on expander rows to let nested rows handle it, |
| 532 |
// avoiding double highlights. |
| 533 |
background: none; |
| 534 |
padding: 0px; |
| 535 |
|
| 536 |
> box > list { |
| 537 |
background: none; |
| 538 |
color: inherit; |
| 539 |
} |
| 540 |
|
| 541 |
list.nested { |
| 542 |
background-color: mix($bg_color, $base_color); |
| 543 |
color: inherit; |
| 544 |
} |
| 545 |
|
| 546 |
list.nested > row { |
| 547 |
@extend %boxed_list_row; |
| 548 |
} |
| 549 |
|
| 550 |
// AdwExpanderRow arrow rotation |
| 551 |
|
| 552 |
image.expander-row-arrow { |
| 553 |
transition: 200ms $ease-out-quad; |
| 554 |
@include margin-start(5px); |
| 555 |
} |
| 556 |
|
| 557 |
&:checked image.expander-row-arrow { |
| 558 |
-gtk-icon-transform: rotate(0turn); |
| 559 |
} |
| 560 |
|
| 561 |
&:not(:checked) image.expander-row-arrow { |
| 562 |
@extend .dim-label; |
| 563 |
|
| 564 |
&:dir(ltr) { |
| 565 |
-gtk-icon-transform: rotate(-0.25turn); |
| 566 |
} |
| 567 |
|
| 568 |
&:dir(rtl) { |
| 569 |
-gtk-icon-transform: rotate(0.25turn); |
| 570 |
} |
| 571 |
} |
| 572 |
|
| 573 |
&:checked image.expander-row-arrow:not(:disabled) { |
| 574 |
color: $selected_bg_color; |
| 575 |
} |
| 576 |
|
| 577 |
.osd &:checked image.expander-row-arrow:not(:disabled) { |
| 578 |
color: inherit; |
| 579 |
} |
| 580 |
|
| 581 |
image.expander-row-arrow:disabled { |
| 582 |
color: $insensitive_fg_color; |
| 583 |
} |
| 584 |
} |
| 585 |
|
| 586 |
/***************** |
| 587 |
* Boxed Lists * |
| 588 |
*****************/ |
| 589 |
|
| 590 |
// Deprecated: use .boxed-list instead |
| 591 |
list.content, |
| 592 |
list.boxed-list { |
| 593 |
> row { |
| 594 |
// Regular rows and expander header rows background |
| 595 |
&, &.expander row.header { |
| 596 |
@extend %boxed_list_row; |
| 597 |
} |
| 598 |
|
| 599 |
&.expander { |
| 600 |
border: none; |
| 601 |
} |
| 602 |
|
| 603 |
// Rounded top |
| 604 |
&:first-child { |
| 605 |
&, &.expander row.header { |
| 606 |
border-top-left-radius: 3px; |
| 607 |
border-top-right-radius: 3px; |
| 608 |
} |
| 609 |
} |
| 610 |
|
| 611 |
// Rounded bottom |
| 612 |
&:last-child { |
| 613 |
&, |
| 614 |
&.expander:not(:checked), |
| 615 |
&.expander:not(:checked) row.header, |
| 616 |
&.expander:checked list.nested, |
| 617 |
&.expander:checked list.nested > row:last-child { |
| 618 |
border-bottom-left-radius: 3px; |
| 619 |
border-bottom-right-radius: 3px; |
| 620 |
border-bottom-width: 1px; |
| 621 |
} |
| 622 |
} |
| 623 |
} |
| 624 |
} |
| 625 |
|
| 626 |
/***************** |
| 627 |
* Popover lists * |
| 628 |
*****************/ |
| 629 |
|
| 630 |
popover.menu { |
| 631 |
list, listview { |
| 632 |
background: none; |
| 633 |
color: inherit; |
| 634 |
|
| 635 |
> row { |
| 636 |
border-radius: 2px; |
| 637 |
padding: 5px $_menu_padding; |
| 638 |
min-height: 16px; |
| 639 |
min-width: 40px; |
| 640 |
|
| 641 |
&:hover, &:active, &.has-open-popup { |
| 642 |
&, &:selected.activatable { |
| 643 |
@extend %selected_items; |
| 644 |
} |
| 645 |
} |
| 646 |
|
| 647 |
> box { |
| 648 |
border-spacing: 6px; |
| 649 |
} |
| 650 |
} |
| 651 |
} |
| 652 |
} |
| 653 |
|
| 654 |
/********** |
| 655 |
* Toasts * |
| 656 |
**********/ |
| 657 |
|
| 658 |
toast { |
| 659 |
@extend %osd; |
| 660 |
|
| 661 |
margin: 12px; |
| 662 |
margin-bottom: 24px; |
| 663 |
|
| 664 |
border-radius: 3px; |
| 665 |
border-spacing: 6px; |
| 666 |
padding: 5px; |
| 667 |
|
| 668 |
&:dir(ltr) { padding-left: 10px; } |
| 669 |
&:dir(rtl) { padding-right: 10px; } |
| 670 |
|
| 671 |
> label { |
| 672 |
margin: 0 6px; |
| 673 |
} |
| 674 |
|
| 675 |
button { |
| 676 |
@extend %osd_button; |
| 677 |
} |
| 678 |
|
| 679 |
@if $variant == 'lighter' { |
| 680 |
box-shadow: 0 0 0 1px $osd_borders_color; |
| 681 |
} |
| 682 |
} |
| 683 |
|
| 684 |
/***************** |
| 685 |
* AdwStatusPage * |
| 686 |
*****************/ |
| 687 |
|
| 688 |
statuspage { |
| 689 |
> scrolledwindow > viewport > box { |
| 690 |
margin: 30px 10px; |
| 691 |
border-spacing: 30px; |
| 692 |
|
| 693 |
> clamp > box { |
| 694 |
border-spacing: 10px; |
| 695 |
|
| 696 |
> .icon { |
| 697 |
-gtk-icon-size: 128px; |
| 698 |
|
| 699 |
color: gtkalpha(currentColor, 0.55); |
| 700 |
|
| 701 |
&:disabled { |
| 702 |
opacity: if($variant !='dark', 0.45, 0.55); |
| 703 |
} |
| 704 |
|
| 705 |
&:not(:last-child) { |
| 706 |
margin-bottom: 20px; |
| 707 |
} |
| 708 |
} |
| 709 |
} |
| 710 |
} |
| 711 |
|
| 712 |
&.compact > scrolledwindow > viewport > box { |
| 713 |
margin: 20px 10px; |
| 714 |
border-spacing: 20px; |
| 715 |
|
| 716 |
> clamp > box { |
| 717 |
> .icon { |
| 718 |
-gtk-icon-size: 96px; |
| 719 |
|
| 720 |
&:not(:last-child) { |
| 721 |
margin-bottom: 10px; |
| 722 |
} |
| 723 |
} |
| 724 |
|
| 725 |
> .title { |
| 726 |
font-size: 18pt; |
| 727 |
} |
| 728 |
} |
| 729 |
} |
| 730 |
} |
| 731 |
|
| 732 |
/********* |
| 733 |
* Cards * |
| 734 |
*********/ |
| 735 |
|
| 736 |
.card { |
| 737 |
@at-root %card, & { |
| 738 |
background-color: $base_color; |
| 739 |
color: $fg_color; |
| 740 |
border-style: solid; |
| 741 |
border-width: 1px; |
| 742 |
border-color: $borders_color; |
| 743 |
border-radius: 3px; |
| 744 |
|
| 745 |
.osd &, &.osd { |
| 746 |
background-color: gtkalpha(currentColor, .1); |
| 747 |
color: $osd_fg_color; |
| 748 |
|
| 749 |
@if $variant == 'lighter' { |
| 750 |
box-shadow: 0 0 0 1px $osd_borders_color; |
| 751 |
} @else { |
| 752 |
box-shadow: none; |
| 753 |
} |
| 754 |
} |
| 755 |
} |
| 756 |
|
| 757 |
@include focus-ring(); |
| 758 |
|
| 759 |
.osd &, &.osd { |
| 760 |
&:focus:focus-visible { |
| 761 |
outline-color: $selected_bg_color; |
| 762 |
} |
| 763 |
} |
| 764 |
|
| 765 |
&.activatable { |
| 766 |
transition: $button_transition; |
| 767 |
|
| 768 |
&:hover { |
| 769 |
background-color: if($variant != 'dark', mix($base_color, black, 95%), mix($base_color, white, 97%)); |
| 770 |
} |
| 771 |
|
| 772 |
&:active { |
| 773 |
background-color: mix($bg_color, $base_color); |
| 774 |
} |
| 775 |
} |
| 776 |
} |
| 777 |
|
| 778 |
/*************** |
| 779 |
* Preferences * |
| 780 |
***************/ |
| 781 |
|
| 782 |
preferencespage > scrolledwindow > viewport > clamp > box { |
| 783 |
margin: 20px 10px; |
| 784 |
border-spacing: 20px; |
| 785 |
} |
| 786 |
|
| 787 |
preferencesgroup > box { |
| 788 |
&, .labels { |
| 789 |
border-spacing: 6px; |
| 790 |
} |
| 791 |
|
| 792 |
> box.header:not(.single-line) { |
| 793 |
margin-bottom: 6px; |
| 794 |
} |
| 795 |
|
| 796 |
> box.single-line { |
| 797 |
min-height: 30px; |
| 798 |
} |
| 799 |
} |
| 800 |
|
| 801 |
/**************** |
| 802 |
* Progress bar * |
| 803 |
****************/ |
| 804 |
|
| 805 |
progressbar { |
| 806 |
&.osd { |
| 807 |
&.horizontal { |
| 808 |
> trough, > trough > progress { min-height: 3px; } |
| 809 |
} |
| 810 |
|
| 811 |
&.vertical { |
| 812 |
> trough, > trough > progress { min-width: 3px; } |
| 813 |
} |
| 814 |
} |
| 815 |
|
| 816 |
.osd & > trough > progress { |
| 817 |
background-color: $selected_bg_color; |
| 818 |
} |
| 819 |
} |
| 820 |
|
| 821 |
/*********** |
| 822 |
* Tab bar * |
| 823 |
***********/ |
| 824 |
|
| 825 |
$tab_needs_attention_gradient: radial-gradient(ellipse at bottom, |
| 826 |
transparentize(white, .2), |
| 827 |
gtkalpha($selected_bg_color, .4) 10%, |
| 828 |
gtkalpha($selected_bg_color, 0) 30%); |
| 829 |
|
| 830 |
@mixin undershoot-gradient($dir) { |
| 831 |
background: linear-gradient(to #{$dir}, |
| 832 |
$bg_color, |
| 833 |
transparentize($bg_color, 1) 20px); |
| 834 |
} |
| 835 |
|
| 836 |
@mixin need-attention-gradient($dir) { |
| 837 |
background: linear-gradient(to #{$dir}, |
| 838 |
transparentize($selected_bg_color, .3), |
| 839 |
transparentize($selected_bg_color, .5) 1px, |
| 840 |
transparentize($selected_bg_color, 1) 20px); |
| 841 |
} |
| 842 |
|
| 843 |
tabbar { |
| 844 |
.box { |
| 845 |
min-height: 20px; |
| 846 |
background: $bg_color; |
| 847 |
} |
| 848 |
|
| 849 |
scrolledwindow.pinned { |
| 850 |
undershoot { |
| 851 |
border: 0 solid $borders_color; |
| 852 |
} |
| 853 |
|
| 854 |
&:dir(rtl) undershoot.left { |
| 855 |
border-left-width: 1px; |
| 856 |
} |
| 857 |
|
| 858 |
&:dir(ltr) undershoot.right { |
| 859 |
border-right-width: 1px; |
| 860 |
} |
| 861 |
|
| 862 |
tabbox > background { |
| 863 |
&:dir(ltr) { |
| 864 |
box-shadow: inset -1px 0 $borders_color; |
| 865 |
} |
| 866 |
|
| 867 |
&:dir(rtl) { |
| 868 |
box-shadow: inset 1px 0 $borders_color; |
| 869 |
} |
| 870 |
} |
| 871 |
} |
| 872 |
|
| 873 |
undershoot { |
| 874 |
transition: none; |
| 875 |
|
| 876 |
&.left { |
| 877 |
@include undershoot-gradient("right"); |
| 878 |
} |
| 879 |
|
| 880 |
&.right { |
| 881 |
@include undershoot-gradient("left"); |
| 882 |
} |
| 883 |
} |
| 884 |
|
| 885 |
.needs-attention-left undershoot.left { |
| 886 |
@include need-attention-gradient("right"); |
| 887 |
} |
| 888 |
|
| 889 |
.needs-attention-right undershoot.right { |
| 890 |
@include need-attention-gradient("left"); |
| 891 |
} |
| 892 |
|
| 893 |
tabbox { |
| 894 |
> background { |
| 895 |
background-color: $bg_color; |
| 896 |
} |
| 897 |
|
| 898 |
> widget { |
| 899 |
@include focus-ring(); |
| 900 |
} |
| 901 |
} |
| 902 |
|
| 903 |
tab { |
| 904 |
border-style: solid; |
| 905 |
border-style: solid; |
| 906 |
border-color: $borders_color; |
| 907 |
border-width: 0 1px 0 1px; |
| 908 |
transition: background 150ms ease-in-out; |
| 909 |
background-color: transparentize($base_color, 1); |
| 910 |
background-clip: padding-box; |
| 911 |
color: $insensitive_fg_color; |
| 912 |
|
| 913 |
&:checked, &:checked:hover { |
| 914 |
background-color: $base_color; |
| 915 |
color: $fg_color; |
| 916 |
} |
| 917 |
|
| 918 |
&:hover { |
| 919 |
background-color: transparentize($base_color, 0.5); |
| 920 |
color: mix($fg_color, $insensitive_fg_color, 50%); |
| 921 |
} |
| 922 |
|
| 923 |
&.needs-attention { |
| 924 |
background-image: $tab_needs_attention_gradient; |
| 925 |
|
| 926 |
&:hover { |
| 927 |
background-image: image(gtkalpha(currentColor, .03)), $tab_needs_attention_gradient; |
| 928 |
} |
| 929 |
} |
| 930 |
} |
| 931 |
|
| 932 |
.start-action, |
| 933 |
.end-action { |
| 934 |
background-color: transparentize($base_color, 1); |
| 935 |
background-clip: padding-box; |
| 936 |
border-color: $borders_color; |
| 937 |
border-style: solid; |
| 938 |
transition: background 150ms ease-in-out; |
| 939 |
|
| 940 |
button { |
| 941 |
border: none; |
| 942 |
border-radius: 0; |
| 943 |
} |
| 944 |
} |
| 945 |
|
| 946 |
.start-action:dir(ltr), |
| 947 |
.end-action:dir(rtl) { |
| 948 |
border-right-width: 1px; |
| 949 |
} |
| 950 |
|
| 951 |
.start-action:dir(rtl), |
| 952 |
.end-action:dir(ltr) { |
| 953 |
border-left-width: 1px; |
| 954 |
} |
| 955 |
|
| 956 |
&:not(.inline) { |
| 957 |
.box { |
| 958 |
border-bottom: 1px solid $borders_color; |
| 959 |
} |
| 960 |
} |
| 961 |
} |
| 962 |
|
| 963 |
dnd tab { |
| 964 |
min-height: 20px; |
| 965 |
background-color: $base_color; |
| 966 |
|
| 967 |
&.needs-attention { |
| 968 |
background-image: $tab_needs_attention_gradient; |
| 969 |
} |
| 970 |
|
| 971 |
box-shadow: 0 2px 6px 1px if($variant!='dark', transparentize(black, 0.93), transparentize(black, 0.65)), |
| 972 |
0 0 0 1px darken($borders_color, 5%); |
| 973 |
|
| 974 |
margin: 25px; |
| 975 |
} |
| 976 |
|
| 977 |
tabbar, |
| 978 |
dnd { |
| 979 |
tab { |
| 980 |
padding: 6px; |
| 981 |
|
| 982 |
button.image-button { |
| 983 |
padding: 0; |
| 984 |
margin: 0; |
| 985 |
min-width: 22px; |
| 986 |
min-height: 22px; |
| 987 |
border-radius: 99px; |
| 988 |
} |
| 989 |
} |
| 990 |
} |
| 991 |
|
| 992 |
tabview:drop(active), |
| 993 |
tabbox:drop(active) { |
| 994 |
box-shadow: none; |
| 995 |
} |
| 996 |
|
| 997 |
/***************** |
| 998 |
* View switcher * |
| 999 |
*****************/ |
| 1000 |
|
| 1001 |
viewswitcher { |
| 1002 |
margin: 0; |
| 1003 |
border-spacing: 0; |
| 1004 |
|
| 1005 |
button.toggle { |
| 1006 |
font-weight: normal; |
| 1007 |
border-radius: 0; |
| 1008 |
border-style: none; |
| 1009 |
margin: 0; |
| 1010 |
padding: 0; |
| 1011 |
|
| 1012 |
> stack > box { |
| 1013 |
&.narrow { |
| 1014 |
font-size: 0.75rem; |
| 1015 |
padding-top: 7px; |
| 1016 |
padding-bottom: 5px; |
| 1017 |
border-spacing: 4px; |
| 1018 |
|
| 1019 |
> stack > label { |
| 1020 |
padding-left: 8px; |
| 1021 |
padding-right: 8px; |
| 1022 |
} |
| 1023 |
} |
| 1024 |
|
| 1025 |
&.wide { |
| 1026 |
padding: 8px 10px; |
| 1027 |
border-spacing: 6px; |
| 1028 |
} |
| 1029 |
} |
| 1030 |
} |
| 1031 |
} |
| 1032 |
|
| 1033 |
/********************** |
| 1034 |
* AdwViewSwitcherBar * |
| 1035 |
**********************/ |
| 1036 |
|
| 1037 |
viewswitcherbar actionbar > revealer > box { |
| 1038 |
padding: 0; |
| 1039 |
} |
| 1040 |
|
| 1041 |
viewswitcherbar viewswitcher { |
| 1042 |
& button.toggle { |
| 1043 |
color: $fg_color; |
| 1044 |
background-color: transparent; |
| 1045 |
|
| 1046 |
&:hover { |
| 1047 |
color: $fg_color; |
| 1048 |
background-color: $button_bg; |
| 1049 |
box-shadow: inset 1px 0 $button_border, |
| 1050 |
inset -1px 0 $button_border; |
| 1051 |
} |
| 1052 |
|
| 1053 |
&.keyboard-activating, |
| 1054 |
&:active, |
| 1055 |
&:checked { |
| 1056 |
@include button(active); |
| 1057 |
} |
| 1058 |
} |
| 1059 |
} |
| 1060 |
|
| 1061 |
/************************ |
| 1062 |
* AdwViewSwitcherTitle * |
| 1063 |
************************/ |
| 1064 |
|
| 1065 |
viewswitchertitle viewswitcher { |
| 1066 |
margin-left: 12px; |
| 1067 |
margin-right: 12px; |
| 1068 |
|
| 1069 |
& button.toggle { |
| 1070 |
color: $header_fg; |
| 1071 |
background-color: transparentize($header_bg, 1); |
| 1072 |
|
| 1073 |
&:hover { |
| 1074 |
color: $header_fg; |
| 1075 |
background-color: $header_button_bg; |
| 1076 |
box-shadow: inset 1px 0 $header_button_border, |
| 1077 |
inset -1px 0 $header_button_border; |
| 1078 |
} |
| 1079 |
|
| 1080 |
&.keyboard-activating, |
| 1081 |
&:active, |
| 1082 |
&:checked { |
| 1083 |
@include button(header-active); |
| 1084 |
} |
| 1085 |
} |
| 1086 |
} |
| 1087 |
|
| 1088 |
/******************* |
| 1089 |
* AdwIndicatorBin * |
| 1090 |
*******************/ |
| 1091 |
|
| 1092 |
indicatorbin { |
| 1093 |
> indicator, > mask { |
| 1094 |
min-width: 6px; |
| 1095 |
min-height: 6px; |
| 1096 |
border-radius: 100px; |
| 1097 |
} |
| 1098 |
|
| 1099 |
> indicator { |
| 1100 |
margin: 1px; |
| 1101 |
background: gtkalpha(currentColor, .4); |
| 1102 |
|
| 1103 |
> label { |
| 1104 |
font-size: 0.6rem; |
| 1105 |
font-weight: bold; |
| 1106 |
padding: 1px 4px; |
| 1107 |
color: white; |
| 1108 |
} |
| 1109 |
} |
| 1110 |
|
| 1111 |
> mask { |
| 1112 |
padding: 1px; |
| 1113 |
background: black; |
| 1114 |
} |
| 1115 |
|
| 1116 |
&.needs-attention > indicator { |
| 1117 |
background: $selected_bg_color; |
| 1118 |
|
| 1119 |
> label { color: $selected_fg_color; } |
| 1120 |
} |
| 1121 |
} |