_common.scss
Unicode text, UTF-8 text
1/** 2* Base States 3*/ 4 5.background { 6background-color: $surface-z0; 7color: $on-surface; 8} 9 10dnd { 11color: $on-surface; 12} 13 14.normal-icons { 15-gtk-icon-size: 16px; 16} 17 18.large-icons { 19-gtk-icon-size: 32px; 20} 21 22image:disabled { 23-gtk-icon-filter: opacity(0.5); 24} 25 26.view { 27// background-color: $surface-z1; 28// color: $on-surface; 29 30> .cell:hover { 31background-color: overlay("hover-alt", $on-surface); 32} 33 34&:disabled { 35color: disabled($on-surface); 36} 37 38&:selected { 39background-color: $overlay-selected; 40} 41 42> .cell:selected:hover { 43background-color: overlay("hover-alt", $primary, $on: $overlay-selected); 44} 45} 46 47textview { 48caret-color: $primary; 49 50> text { 51> selection { 52background-color: $overlay-selected; 53} 54} 55 56> border { 57// background-color: $surface-z1-alt; 58color: hint($on-surface); // FIXME: not working 59} 60} 61 62iconview { 63> .cell { 64border-radius: $corner-radius; 65} 66 67&:drop(active) { 68// box-shadow: none; 69} 70 71> dndtarget:drop(active) { 72box-shadow: inset 0 0 0 2px $primary; 73} 74} 75 76%iconview-desktop { 77// background-color: $scrim; 78color: $on-dark; 79text-shadow: $text-shadow; 80 81> rubberband { 82border: 1px solid primary($on-dark); 83background-color: rgba(primary($on-dark), .24); 84} 85} 86 87rubberband { 88border: 1px solid $primary; 89background-color: rgba($primary, .24); 90} 91 92flowbox { 93padding: 4px; 94border-spacing: 4px; 95 96> flowboxchild { 97padding: 4px; 98border-radius: $corner-radius; 99 100@extend %ripple; 101@include ink-color($on-surface, $hover-alt: true); 102 103&:selected { 104background-color: $overlay-selected; 105 106@include ink-color($primary, $hover-alt: true, $on: $overlay-selected); 107} 108} 109} 110 111gridview { 112padding: 4px; 113border-spacing: 4px; 114 115> child { 116padding: 4px; 117border-radius: $corner-radius; 118 119@extend %ripple; 120@include ink-color($on-surface, $hover-alt: true); 121 122&:selected { 123background-color: $overlay-selected; 124 125@include ink-color($primary, $hover-alt: true, $on: $overlay-selected); 126} 127} 128} 129 130coverflow > cover { 131box-shadow: $shadow-z2; 132background-color: $surface-z8; 133color: $on-surface; 134} 135 136.content-view .tile { 137// margin: 2px; 138// padding: 0; 139// border-radius: 0; 140// background-color: black; 141 142&:selected { 143background-color: transparent; 144} 145} 146 147label { 148caret-color: $primary; 149 150&.separator { 151color: hint($on-surface); 152} 153 154&.error { 155color: $error; 156} 157 158> selection { 159background-color: $overlay-selected; 160} 161 162&:disabled { 163color: disabled($on-surface); 164 165headerbar &, 166modelbutton &, 167tab &, 168button & { 169color: inherit; 170} 171} 172 173&.osd { 174border-radius: $corner-radius; 175background-color: $tooltip; 176color: $on-tooltip; 177} 178} 179 180.dim-label { 181color: hint($on-surface); 182} 183 184window.assistant { 185.sidebar { 186padding: 4px 0; 187 188> label { 189min-height: $medium-size; 190padding: 0 12px; 191color: disabled($on-surface); 192font-weight: 500; 193 194&.highlight { 195color: $on-surface; 196} 197} 198} 199} 200 201%osd, 202.osd { 203// opacity: .9; 204} 205 206/** 207* Spinner Animation 208*/ 209 210@keyframes spin { 211to { 212transform: rotate(1turn); 213} 214} 215 216spinner { 217// background: none; 218opacity: 0; // non spinning spinner makes no sense 219color: $primary; 220-gtk-icon-source: -gtk-icontheme('process-working-symbolic'); 221transition: opacity $duration * 4 $ease-out; 222animation: spin 1s linear infinite; 223 224&:checked { 225opacity: 1; 226} 227 228&:disabled { 229color: disabled-hint($on-surface); 230} 231} 232 233/** 234* General Typography 235*/ 236 237@function pt($size: $font-size) { 238@return ($size * .75 / 1px) * 1pt; 239} 240 241.large-title { 242font-weight: 400; 243font-size: pt(48px); 244} 245 246.title-1 { 247font-weight: 400; 248font-size: pt(34px); 249letter-spacing: pt(.25px); 250} 251 252.title-2 { 253font-weight: 400; 254font-size: pt(24px); 255} 256 257.title-3 { 258font-weight: 500; 259font-size: pt(20px); 260letter-spacing: pt(.15px); 261} 262 263.title-4 { 264font-weight: 400; 265font-size: pt(16px); 266letter-spacing: pt(.5px); 267} 268 269.heading { 270font-weight: 500; 271font-size: 1em; 272} 273 274.body { 275font-weight: 400; 276font-size: 1em; 277} 278 279.caption-heading { 280font-weight: 500; 281font-size: pt(12px); 282letter-spacing: pt(1.5px); 283} 284 285.caption { 286font-weight: 400; 287font-size: pt(12px); 288letter-spacing: pt(.4px); 289} 290 291/** 292* Text Entries 293*/ 294 295%entry, 296entry { 297min-height: $medium-size; 298padding: 0 8px; 299border-spacing: $container-padding; 300border-radius: $corner-radius $corner-radius 0 0; 301 302@include entry(normal); 303 304&:hover, 305&:drop(active) { 306@include entry(hover); 307} 308 309&:focus-within { 310@include entry(checked); 311 312> text > placeholder { 313opacity: 0; 314} 315} 316 317&:disabled { 318@include entry(disabled); 319} 320 321&.flat { 322min-height: 0; 323padding: 2px; 324border-radius: 0; 325background-color: transparent; 326} 327 328> text { 329> placeholder { 330color: hint($on-surface); 331} 332 333> selection { 334background-color: $overlay-selected; 335} 336 337> block-cursor { 338background-color: $primary; 339color: $on-primary; 340} 341 342> undershoot { 343&.left { 344// @include undershoot(left); 345} 346 347&.right { 348// @include undershoot(right); 349} 350} 351} 352 353// icons inside the entry 354> image { 355min-width: $small-size; 356min-height: $small-size; 357border-radius: $circular-radius; 358@extend %ripple; 359@include ink-color($on-surface); 360color: hint($on-surface); 361margin-top: $container-padding; 362margin-bottom: $container-padding; 363 364&:disabled { 365color: disabled($on-surface); 366} 367 368&.left { 369margin-left: ($medium-size - $small-size) / 2 - 8px; 370} 371 372&.right { 373margin-right: ($medium-size - $small-size) / 2 - 8px; 374} 375} 376 377&.password > image.caps-lock-indicator { 378} 379 380// entry error and warning style 381@each $class, $color in (".error": $error, ".warning": $warning) { 382&#{$class} { 383@include entry(normal, $color); 384 385&:focus-within { 386@include entry(checked, $color); 387} 388 389&:disabled { 390@include entry(disabled, $color); 391} 392} 393} 394 395.osd & { 396} 397 398> progress > trough > progress { 399margin: 0 -8px; 400margin-bottom: -4px; 401border-bottom: 2px solid $primary; 402background-color: transparent; 403} 404 405// linked entries 406.linked:not(.vertical) > & { 407// @extend %linked; 408} 409 410// Vertically linked entries 411.linked.vertical > & { 412// @extend %linked-vertical; 413} 414} 415 416%entry_raised { 417border-radius: $corner-radius; 418 419@include entry(raised-normal); 420 421&:focus-within { 422@include entry(raised-focus); 423} 424 425&:drop(active) { 426@include entry(raised-hover); 427} 428 429&:disabled { 430@include entry(raised-disabled); 431} 432 433// entry error and warning style 434@each $class, $color in (".error": $error, ".warning": $warning) { 435&#{$class} { 436@include entry(raised-normal, $color); 437 438&:focus-within { 439@include entry(raised-focus, $color); 440} 441 442&:disabled { 443@include entry(raised-disabled, $color); 444} 445 446image { 447color: hint(on($color)); 448 449&:hover, 450&:active { 451color: on($color); 452} 453 454&:disabled { 455color: disabled(on($color)); 456} 457} 458} 459} 460} 461 462treeview entry { 463&, 464&.flat { 465background-color: $surface-z1; 466 467&, 468&:focus-within { 469border-image: none; 470box-shadow: none; 471} 472} 473} 474 475.entry-tag { 476margin: 2px; 477border-radius: $circular-radius; 478box-shadow: none; 479background-color: fill($on-surface); 480color: $on-surface; 481 482&:hover { 483background-image: image(overlay("hover", $on-surface)); 484} 485 486// side margins: compensate the entry padding with a negative margin 487// then the negative margin itself 488:dir(ltr) & { 489margin-left: 4px; 490margin-right: 0; 491padding-left: 12px; 492padding-right: 8px; 493} 494 495:dir(rtl) & { 496margin-left: 0; 497margin-right: 4px; 498padding-left: 8px; 499padding-right: 12px; 500} 501 502// seems any sizing doesn't work 503&.button { 504box-shadow: none; 505background-color: transparent; 506color: hint($on-surface); 507} 508} 509 510/** 511* Buttons 512*/ 513 514// stuff for .needs-attention 515@keyframes needs-attention { 516from { 517background-image: radial-gradient(farthest-side, $primary 0%, transparent 0%); 518} 519 520to { 521background-image: radial-gradient(farthest-side, $primary 100%, transparent 100%); 522} 523} 524 525%button, 526button { 527min-height: 24px; 528min-width: 16px; 529padding: ($medium-size - 24px) / 2 ($medium-size - 16px) / 2; 530border-radius: $corner-radius; 531background-color: $surface-z8; 532color: $on-surface; 533font-weight: 500; 534 535@extend %ripple; 536@include ink-color($on-surface, $on: $surface-z8, $button-style: "raised"); 537 538&:disabled { 539box-shadow: none; 540background-color: fill($on-surface); 541color: disabled($on-surface); 542} 543 544&:checked { 545$background-color: overlay("activated", $primary, $on: $surface-z8); 546color: $primary; 547@include ink-color($primary, $on: $background-color, $button-style: "raised"); 548 549&:disabled { 550box-shadow: none; 551background-color: overlay("activated", $on-surface, $on: fill($on-surface)); 552color: disabled($on-surface); 553} 554} 555 556&.text-button { 557min-width: 64px - 16px * 2; 558padding-left: 16px; 559padding-right: 16px; 560} 561 562&.image-button { 563min-width: 24px; 564padding: ($medium-size - 24px) / 2; 565border-radius: $circular-radius; 566} 567 568// NOTE: Some image-only buttons use this as well 569&.text-button.image-button { 570min-width: 64px - 16px * 2; 571padding-left: 16px; 572padding-right: 16px; 573// min-width: 24px; 574// padding: ($medium-size - 24px) / 2; 575border-radius: $corner-radius; 576 577label { 578&:first-child { 579// margin-left: 16px - ($medium-size - 24px) / 2; 580} 581 582&:last-child { 583// margin-right: 16px - ($medium-size - 24px) / 2; 584} 585} 586 587image:not(:only-child) { 588// margin: 0 (24px - 16px) / 2; 589} 590 591image { 592&:first-child { 593margin-left: 12px - 16px; 594margin-right: 8px; 595} 596 597&:last-child { 598margin-left: 8px; 599margin-right: 12px - 16px; 600} 601} 602} 603 604.linked:not(.vertical) > & { 605// @extend %linked; 606 607&.image-button:not(.text-button) { 608// @extend %linked-image-button; 609} 610} 611 612.linked.vertical > & { 613// @extend %linked-vertical; 614 615&.image-button:not(.text-button) { 616// @extend %linked-vertical-image-button; 617} 618} 619} 620 621%button-outlined { 622background-color: transparent; 623@include ink-color($on-surface, $hover-alt: true, $button-style: "outlined"); 624} 625 626%button-flat-basic { 627background-color: transparent; 628color: hint($on-surface); 629@include ink-color($on-surface, $button-style: "flat"); 630 631&:disabled { 632background-color: transparent; 633color: disabled-hint($on-surface); 634} 635} 636 637%button-flat-activatable { 638@extend %button-flat-basic; 639 640&:checked { 641$background-color: overlay("activated", $primary); 642color: $primary; 643@include ink-color($primary, $on: $background-color, $button-style: "flat"); 644 645&:disabled { 646color: disabled($on-surface); 647} 648} 649} 650 651%button-flat, 652button.flat { 653@extend %button-flat-activatable; 654 655&.text-button { 656min-width: 64px - 8px * 2; 657padding-left: 8px; 658padding-right: 8px; 659} 660 661&.text-button.image-button { 662min-width: 24px; 663padding: ($medium-size - 24px) / 2; 664 665label { 666&:first-child { 667margin-left: 12px - ($medium-size - 24px) / 2; 668} 669 670&:last-child { 671margin-right: 12px - ($medium-size - 24px) / 2; 672} 673} 674} 675 676.linked:not(.vertical) > &, 677.linked.vertical > & { 678&:not(:only-child) { // specificity bump 679border-radius: $corner-radius; 680 681&.image-button:not(.text-button) { 682border-radius: $circular-radius; 683} 684} 685} 686} 687 688button { 689// big standalone buttons like in Documents pager 690&.osd { 691padding: ($large-size - 24px) / 2 ($large-size - 16px) / 2; 692 693&.image-button { 694padding: ($large-size - 24px) / 2; 695} 696 697&:disabled { 698opacity: 0; 699} 700} 701 702// overlay / OSD style 703@at-root %osd_button, 704.osd & { 705} 706 707// Suggested and Destructive Action buttons 708@each $class, $color in (".suggested-action": $primary, ".destructive-action": $error) { 709&#{$class} { 710background-color: $color; 711color: on($color); 712@include ink-color(on($color), $on: $color, $button-style: "raised"); 713 714&:disabled { 715box-shadow: none; 716background-color: fill($on-surface); 717color: disabled($on-surface); 718} 719 720&:checked { 721background-color: overlay("activated", on($color), $on: $color); 722} 723 724&.flat { 725background-color: transparent; 726@include ink-color($color); 727 728&:disabled { 729box-shadow: none; 730background-color: transparent; 731color: disabled-hint($on-surface); 732} 733 734&:checked { 735background-color: overlay("activated", $color); 736} 737} 738 739.osd & { 740} 741} 742} 743 744stackswitcher > & { 745// to position the needs attention dot, padding is added to the button 746// child, a label needs just lateral padding while an icon needs vertical 747// padding added too. 748 749> label { 750margin: 0 -6px; 751padding: 0 6px; 752} 753 754> image { 755margin: -3px -6px; 756padding: 3px 6px; 757} 758 759&.needs-attention { 760> label, 761> image { 762@extend %needs-attention; 763} 764 765&:checked { 766> label, 767> image { 768animation: none; 769background-image: none; 770} 771} 772} 773} 774 775&.font > box { 776border-spacing: 6px; 777 778> box { 779> separator { 780@extend %hide_separators; 781} 782 783> label { 784// font-weight: bold; 785} 786} 787} 788 789// force circular button shape 790&.close, 791&.circular { 792border-radius: $circular-radius; 793} 794} 795 796%button-small { 797min-height: $small-size; 798min-width: $small-size; 799padding: 0; 800border-radius: $circular-radius; 801} 802 803%needs-attention { 804animation: needs-attention $ripple-fade-in-duration $ease-out forwards; 805background-repeat: no-repeat; 806background-position: right 3px; 807background-size: 6px 6px; 808 809&:dir(rtl) { 810background-position: left 3px; 811} 812} 813 814.linked:not(stackswitcher) { 815border-spacing: $container-padding; 816} 817 818.linked:not(.vertical) > button.radio { 819border-radius: 0; 820 821&:first-child { 822border-top-left-radius: $corner-radius; 823border-bottom-left-radius: $corner-radius; 824} 825 826&:last-child { 827border-top-right-radius: $corner-radius; 828border-bottom-right-radius: $corner-radius; 829} 830 831&:not(:first-child) { 832margin-left: -$container-padding; 833} 834} 835 836.linked.vertical > button.radio { 837border-radius: 0; 838 839&:first-child { 840border-top-left-radius: $corner-radius; 841border-top-right-radius: $corner-radius; 842} 843 844&:last-child { 845border-bottom-left-radius: $corner-radius; 846border-bottom-right-radius: $corner-radius; 847} 848 849&:not(:first-child) { 850margin-top: -$container-padding; 851} 852} 853 854%linked-not-first-child { 855border-top-left-radius: 0; 856border-bottom-left-radius: 0; 857} 858 859%linked-not-last-child { 860border-top-right-radius: 0; 861border-bottom-right-radius: 0; 862} 863 864%linked { 865&:not(:first-child) { 866@extend %linked-not-first-child; 867} 868 869&:not(:last-child) { 870@extend %linked-not-last-child; 871} 872} 873 874%linked-vertical-not-first-child { 875border-top-left-radius: 0; 876border-top-right-radius: 0; 877} 878 879%linked-vertical-not-last-child { 880border-bottom-left-radius: 0; 881border-bottom-right-radius: 0; 882} 883 884%linked-vertical { 885&:not(:first-child) { 886@extend %linked-vertical-not-first-child; 887} 888 889&:not(:last-child) { 890@extend %linked-vertical-not-last-child; 891} 892} 893 894%linked-image-button { 895&:first-child { 896border-top-left-radius: $corner-radius; 897border-bottom-left-radius: $corner-radius; 898} 899 900&:last-child { 901border-top-right-radius: $corner-radius; 902border-bottom-right-radius: $corner-radius; 903} 904 905&:only-child { 906border-radius: $circular-radius; 907} 908} 909 910%linked-vertical-image-button { 911&:first-child { 912border-top-left-radius: $corner-radius; 913border-top-right-radius: $corner-radius; 914} 915 916&:last-child { 917border-bottom-left-radius: $corner-radius; 918border-bottom-right-radius: $corner-radius; 919} 920 921&:only-child { 922border-radius: $circular-radius; 923} 924} 925 926/* menu buttons */ 927modelbutton.flat { 928// min-height: $menuitem-size; 929// padding: 0 8px; 930// border-radius: $corner-radius; 931 932@extend %ripple; 933@include ink-color($on-surface); 934 935&:selected { 936// background-color: $overlay-selected; 937} 938} 939 940modelbutton.flat arrow { 941min-width: 16px; 942min-height: 16px; 943color: hint($on-surface); 944 945&:disabled { 946color: disabled-hint($on-surface); 947} 948 949&.left { 950-gtk-icon-source: -gtk-icontheme("pan-start-symbolic"); 951} 952 953&.right { 954-gtk-icon-source: -gtk-icontheme("pan-end-symbolic"); 955} 956} 957 958button.color { 959min-width: $small-size; 960min-height: $small-size; 961padding: $container-padding; 962} 963 964/** 965* Links 966*/ 967 968link { 969color: $primary; 970 971&:visited { 972color: $visited; 973} 974} 975 976button.link { 977color: $primary; 978@include ink-color($primary); 979 980&:visited { 981color: $visited; 982@include ink-color($visited); 983} 984 985> label { 986text-decoration-line: underline; 987} 988} 989 990/** 991* GtkSpinButton 992*/ 993 994spinbutton { 995font-feature-settings: "tnum"; 996 997&:not(.vertical) { 998// in this horizontal configuration, the whole spinbutton 999// behaves as the entry, so we extend the entry styling 1000// and nuke the style on the internal entry 1001@extend %entry; 1002 1003> text { 1004min-width: 32px; 1005} 1006 1007> button { 1008@extend %button-flat-basic; 1009@extend %button-small; 1010 1011margin: $container-padding 0; 1012 1013&.up:dir(ltr), 1014&.down:dir(rtl) { 1015// margin-left: $container-padding / 2; 1016} 1017 1018&.up:dir(rtl), 1019&.down:dir(ltr) { 1020// margin-right: $container-padding / 2; 1021} 1022 1023&.up:dir(ltr) { 1024margin-right: ($medium-size - $small-size) / 2 - 8px; 1025} 1026 1027&.up:dir(rtl) { 1028margin-left: ($medium-size - $small-size) / 2 - 8px; 1029} 1030} 1031} 1032 1033// OSD horizontal 1034.osd &:not(.vertical) { 1035} 1036 1037// Vertical 1038&.vertical { 1039// in the vertical configuration, we treat the spinbutton 1040// as a box, and tweak the style of the entry in the middle 1041// so that it's linked 1042 1043> text { 1044@extend %entry_raised; 1045 1046min-height: $medium-size; 1047min-width: $large-size; 1048padding: 0; 1049 1050> selection { 1051background-color: $overlay-selected; 1052} 1053} 1054 1055button { 1056min-height: $medium-size; 1057min-width: $large-size; 1058padding: 0; 1059 1060@extend %button-flat-basic; 1061 1062// Remove unwanted focus indicator 1063&:focus:not(:hover):not(:active) { 1064box-shadow: inset 0 0 0 9999px transparent; 1065} 1066 1067&.up { 1068border-radius: $corner-radius $corner-radius 0 0; 1069} 1070 1071&.down { 1072border-radius: 0 0 $corner-radius $corner-radius; 1073} 1074} 1075} 1076 1077// OSD vertical 1078.osd &.vertical { 1079} 1080 1081// Misc 1082treeview &:not(.vertical) { 1083min-height: 0; 1084border-style: none; 1085border-radius: 0; 1086 1087> text { 1088min-height: 0; 1089padding: 1px 2px; 1090} 1091} 1092} 1093 1094/** 1095* ComboBoxes 1096*/ 1097 1098dropdown, 1099combobox { 1100arrow { 1101min-width: 16px; 1102min-height: 16px; 1103-gtk-icon-source: -gtk-icontheme('pan-down-symbolic'); 1104transition: -gtk-icon-transform $duration $ease-out; 1105} 1106 1107button:checked arrow { 1108color: $primary; 1109-gtk-icon-transform: rotate(-.5turn); 1110} 1111} 1112 1113dropdown { 1114> button > box { 1115border-spacing: 6px; 1116} 1117 1118> popover.menu > contents { 1119// allow search entries with no padding 1120padding: 0; 1121 1122listview { 1123padding: 6px 0; 1124 1125> row { 1126min-height: 32px - 4px * 2; 1127padding: 4px 8px; 1128 1129&:selected { 1130background-color: overlay("focus", $on-surface); 1131} 1132} 1133} 1134} 1135} 1136 1137// drodowns with searchboxes on top 1138.dropdown-searchbar { 1139border-bottom: 1px solid divider($on-surface); 1140 1141> entry.search { 1142border-image: none; 1143border-radius: 0; 1144box-shadow: none; 1145background-color: transparent; 1146} 1147} 1148 1149combobox { 1150> box > button > box { 1151border-spacing: 6px; 1152} 1153 1154cellview { 1155margin: -2px; 1156} 1157 1158// align menu labels with the button label 1159> popover.menu > contents modelbutton { 1160padding-left: 8px; 1161padding-right: 8px; 1162} 1163 1164> .linked:not(.vertical) > entry:not(:only-child) { 1165// border-radius: $corner-radius $corner-radius 0 0; 1166 1167&:first-child { 1168margin-right: -($medium-size + $container-padding); 1169padding-right: $medium-size; 1170} 1171 1172&:last-child { 1173margin-left: -($medium-size + $container-padding); 1174padding-left: $medium-size; 1175} 1176} 1177 1178> .linked:not(.vertical) > button:not(:only-child) { 1179@extend %button-flat-activatable; 1180// @extend %button-small; 1181 1182min-height: 16px; 1183min-width: 16px; 1184margin: ($medium-size - $small-size) / 2; 1185padding: ($small-size - 16px) / 2; 1186border-radius: $circular-radius; 1187} 1188} 1189 1190// the combo is a composite widget so the way we do button linking doesn't 1191// work, special case needed. See 1192// https://bugzilla.gnome.org/show_bug.cgi?id=733979 1193 1194.linked:not(.vertical) > combobox { 1195&:not(:first-child) > box > button.combo { 1196// @extend %linked-not-first-child; 1197} 1198 1199&:not(:last-child) > box > button.combo { 1200// @extend %linked-not-last-child; 1201} 1202} 1203 1204.linked.vertical > combobox { 1205&:not(:first-child) > box > button.combo { 1206// @extend %linked-vertical-not-first-child; 1207} 1208 1209&:not(:last-child) > box > button.combo { 1210// @extend %linked-vertical-not-last-child; 1211} 1212} 1213 1214dropdown > button.toggle, 1215button.combo:only-child { 1216padding-left: 8px; 1217padding-right: 8px; 1218border-radius: $corner-radius $corner-radius 0 0; 1219font-weight: normal; 1220 1221@include entry(normal); 1222 1223&:focus { 1224@include entry(focus); 1225} 1226 1227&:drop(active), 1228&:hover { 1229@include entry(hover); 1230} 1231 1232&:checked { 1233@include entry(checked); 1234} 1235 1236&:disabled { 1237@include entry(disabled); 1238} 1239 1240arrow { 1241transition: color $duration $ease-out; 1242color: hint($on-surface); 1243 1244&:disabled { 1245color: disabled-hint($on-surface); 1246} 1247} 1248} 1249 1250/** 1251* Toolbars 1252*/ 1253 1254.toolbar { 1255padding: 4px; 1256border-spacing: 4px; 1257 1258&.top { border-bottom: 1px solid divider($on-surface); } 1259&.bottom { border-top: 1px solid divider($on-surface); } 1260&.start { border-right: 1px solid divider($on-surface); } 1261&.end { border-left: 1px solid divider($on-surface); } 1262 1263button { 1264@extend %button-flat; 1265} 1266 1267// on OSD 1268.osd & { 1269} 1270 1271// stand-alone OSD toolbars 1272&.osd { 1273@extend %toolbar-osd; 1274 1275// positional classes for `attached` osd toolbars 1276&.left, 1277&.right, 1278&.top, 1279&.bottom { 1280border-radius: 0; 1281} 1282 1283&.bottom { 1284box-shadow: none; 1285background-color: transparent; 1286background-image: 1287linear-gradient( 1288to bottom, 1289transparent, 1290rgba(black, .1) 30%, 1291rgba(black, .2) 50%, 1292rgba(black, .4) 1293); 1294} 1295} 1296 1297// toolbar separators 1298&.horizontal > separator { 1299margin: 4px 0; 1300} 1301 1302&.vertical > separator { 1303margin: 0 4px; 1304} 1305} 1306 1307%toolbar-osd { 1308transition: $transition-shadow; 1309padding: $container-padding; 1310border-spacing: $container-padding; 1311border-radius: $corner-radius; 1312box-shadow: $shadow-z4, inset 0 1px highlight($surface-z8); 1313background-color: $surface-z8; 1314 1315&:backdrop { 1316box-shadow: $shadow-z2, inset 0 1px highlight($surface-z8); 1317} 1318} 1319 1320// searchbar, location-bar & inline-toolbar 1321.inline-toolbar { 1322padding: $container-padding; 1323border-style: solid; 1324border-width: 0 1px 1px; 1325border-color: divider($on-surface); 1326background-color: $surface-z1; 1327} 1328 1329searchbar > revealer > box { 1330padding: $container-padding; 1331border-spacing: $container-padding; 1332border-bottom: 1px solid divider($on-surface); 1333} 1334 1335/** 1336* Title buttons 1337*/ 1338 1339windowcontrols { 1340border-spacing: $container-padding; 1341 1342&:not(:only-child):not(.empty) { 1343border-image: 1344linear-gradient( 1345to bottom, 1346transparent 12px, 1347divider($on-titlebar) 12px, 1348divider($on-titlebar) calc(100% - 12px), 1349transparent calc(100% - 12px) 1350) 1; 1351 1352&.start:dir(ltr), 1353&.end:dir(rtl) { 1354padding-right: $container-padding; 1355border-right: 1px solid; 1356} 1357 1358&.start:dir(rtl), 1359&.end:dir(ltr) { 1360padding-left: $container-padding; 1361border-left: 1px solid; 1362} 1363} 1364 1365button { 1366} 1367} 1368 1369/** 1370* Header bars 1371*/ 1372 1373.titlebar { 1374transition: background-color $duration $ease-out, color $duration $ease-out; 1375border-radius: $corner-radius $corner-radius 0 0; 1376box-shadow: $shadow-z2, inset 0 1px highlight($titlebar); 1377background-color: $titlebar; 1378color: $on-titlebar; 1379 1380&:disabled { 1381color: disabled($on-titlebar); 1382} 1383 1384&:backdrop { 1385background-color: $titlebar-backdrop; 1386color: hint($on-titlebar); 1387 1388&:disabled { 1389color: disabled-hint($on-titlebar); 1390} 1391} 1392 1393box.start, 1394box.end { 1395border-spacing: $container-padding; 1396} 1397 1398.title { 1399padding-left: 12px; 1400padding-right: 12px; 1401font-weight: bold; 1402} 1403 1404.subtitle { 1405padding-left: 12px; 1406padding-right: 12px; 1407font-size: smaller; 1408} 1409 1410.subtitle, 1411.dim-label { 1412transition: color $duration $ease-out; 1413color: hint($on-titlebar); 1414 1415&:backdrop { 1416color: disabled($on-titlebar); 1417} 1418} 1419 1420// The separator for split headerbars 1421headerbar + separator { 1422background-color: divider($on-titlebar); 1423} 1424 1425entry { 1426box-shadow: inset 0 -1px stroke($on-titlebar); 1427background-color: entry-fill($on-titlebar); 1428color: $on-titlebar; 1429 1430&:disabled { 1431box-shadow: inset 0 -1px disabled-stroke($on-titlebar); 1432background-color: entry-fill($on-titlebar); 1433color: disabled($on-titlebar); 1434} 1435 1436image { 1437color: hint($on-titlebar); 1438 1439&:hover, 1440&:active { 1441color: $on-titlebar; 1442} 1443 1444&:disabled { 1445color: disabled($on-titlebar); 1446} 1447} 1448} 1449 1450.linked:not(.vertical) > entry:not(:only-child) { 1451border-radius: $corner-radius $corner-radius 0 0; 1452} 1453 1454@at-root %titlebar-button, & button:not(.suggested-action):not(.destructive-action) { 1455@extend %button-flat; 1456 1457border-image: radial-gradient(circle closest-corner at center calc(100% - 1px), 1458$titlebar-indicator 0%, 1459transparent 0%) 14600 0 0 / 0 0 0px; 1461background-color: transparent; 1462color: hint($on-titlebar); 1463@include ink-color($on-titlebar); 1464 1465&:disabled { 1466color: disabled-hint($on-titlebar); 1467} 1468 1469@at-root %titlebar-button-checked, 1470&:checked { 1471border-image: radial-gradient(circle closest-corner at center calc(100% - 1px), 1472$titlebar-indicator 100%, 1473transparent 100%) 14740 0 2 / 0 0 2px; 1475background-color: transparent; 1476color: $on-titlebar; 1477@include ink-color($on-titlebar); 1478 1479&:disabled { 1480background-color: transparent; 1481color: disabled($on-titlebar); 1482} 1483} 1484 1485&:backdrop { 1486color: disabled($on-titlebar); 1487 1488&:disabled { 1489color: disabled-hint($on-titlebar); 1490} 1491 1492&:checked { 1493color: hint($on-titlebar); 1494 1495&:disabled { 1496color: disabled-hint($on-titlebar); 1497} 1498} 1499} 1500} 1501 1502button.suggested-action, 1503button.destructive-action { 1504&:disabled { 1505background-color: fill($on-titlebar); 1506color: disabled($on-titlebar); 1507} 1508} 1509 1510// FIXME: Ugly overriding 1511stackswitcher button:not(.suggested-action):not(.destructive-action).text-button { 1512min-width: 120px - 8px * 2; 1513} 1514 1515// FIXME: Ugly overriding 1516.path-bar button:not(.suggested-action):not(.destructive-action).text-button { 1517min-width: 0; 1518padding-left: ($medium-size - 24px) / 2; 1519padding-right: ($medium-size - 24px) / 2; 1520} 1521 1522&.selection-mode { 1523// 0.1ms was a workaround for https://gitlab.gnome.org/GNOME/gtk/issues/698 1524// but let's keep it for backwards compatibility. 1525transition: background-color 0.1ms $ripple-fade-in-duration, color $duration $ease-out; 1526animation: ripple-on-headerbar $ripple-fade-in-duration $ease-out; 1527box-shadow: $shadow-z2, inset 0 1px highlight($primary); 1528background-color: $primary; 1529color: $on-primary; 1530 1531&:backdrop { 1532color: hint($on-primary); 1533} 1534 1535.subtitle:link { 1536color: $on-primary; 1537} 1538 1539button:not(.suggested-action):not(.destructive-action) { 1540border-image: radial-gradient(circle closest-corner at center calc(100% - 1px), 1541currentColor 0%, 1542transparent 0%) 15430 0 0 / 0 0 0px; 1544color: $on-primary; 1545 1546&:disabled { 1547color: disabled($on-primary); 1548} 1549 1550&:checked { 1551border-image: radial-gradient(circle closest-corner at center calc(100% - 1px), 1552currentColor 100%, 1553transparent 100%) 15540 0 2 / 0 0 2px; 1555color: $on-primary; 1556 1557&:disabled { 1558color: disabled($on-primary); 1559} 1560} 1561 1562&:backdrop { 1563color: hint($on-primary); 1564 1565&:disabled { 1566color: disabled-hint($on-primary); 1567} 1568 1569&:checked { 1570color: hint($on-primary); 1571 1572&:disabled { 1573color: disabled-hint($on-primary); 1574} 1575} 1576} 1577} 1578 1579.selection-menu { 1580padding-left: 16px; 1581padding-right: 16px; 1582 1583.arrow { 1584-gtk-icon-source: -gtk-icontheme('pan-down-symbolic'); 1585} 1586} 1587} 1588 1589.selection-mode { 1590box-shadow: inset 0 1px highlight($primary); // Avoid double shadows 1591background-color: $primary; 1592} 1593 1594// squared corners when the window is maximized, tiled, or fullscreen 1595.tiled &, 1596.tiled-top &, 1597.tiled-right &, 1598.tiled-bottom &, 1599.tiled-left &, 1600.maximized &, 1601.fullscreen & { 1602border-radius: 0; 1603box-shadow: $shadow-z2; 1604} 1605 1606&.default-decoration { 1607min-height: $small-size; 1608padding: $container-padding; 1609box-shadow: inset 0 1px highlight($titlebar); 1610 1611.tiled &, 1612.maximized &, 1613.fullscreen & { 1614box-shadow: none; 1615} 1616 1617button.titlebutton { 1618min-height: $small-size; 1619min-width: $small-size; 1620margin: 0; 1621padding: 0; 1622} 1623 1624// workaround for non-animatable buttons 1625.background:not(.csd) & button.titlebutton:active { 1626background-size: 1000% 1000%; 1627} 1628} 1629 1630.solid-csd & { 1631&:dir(rtl), &:dir(ltr) { // specificity bump 1632border-radius: 0; 1633box-shadow: $shadow-z2; // just remove the highlight 1634} 1635} 1636} 1637 1638headerbar > windowhandle > box { 1639// The sizing factor needs to be defined in the headerbar node for the case of split headerbars 1640min-height: $large-size; 1641padding: 0 $container-padding; 1642border-spacing: $container-padding; 1643 1644// add vertical margins to common widget on the headerbar to avoid them spanning the whole height 1645entry, 1646spinbutton, 1647button { 1648margin-top: $container-padding; 1649margin-bottom: $container-padding; 1650} 1651 1652separator.titlebutton { 1653margin-top: $large-size / 4; 1654margin-bottom: $large-size / 4; 1655background-color: divider($on-titlebar); 1656} 1657 1658switch { 1659margin-top: ($large-size - 24px) / 2; 1660margin-bottom: ($large-size - 24px) / 2; 1661} 1662 1663// reset button margins of the spinbutton 1664spinbutton button { 1665margin-top: 0; 1666margin-bottom: 0; 1667} 1668 1669// FIXME: This is a hacky workaround. 1670.entry-tag { 1671margin-top: 5px; 1672margin-bottom: 5px; 1673} 1674} 1675 1676// Development versions of apps to use a differently styled headerbar 1677window.devel .titlebar:not(.selection-mode) { 1678} 1679 1680/** 1681* Pathbars 1682*/ 1683 1684%pathbar_button, 1685pathbar.linked:not(.vertical) > button { 1686@extend %button-flat-basic; 1687 1688padding-left: ($medium-size - 24px) / 2; 1689padding-right: ($medium-size - 24px) / 2; 1690border-image: radial-gradient(circle closest-corner at center calc(100% - 1px), 1691$primary 0%, 1692transparent 0%) 16930 0 0 / 0 0 0px; 1694border-radius: $corner-radius; 1695 1696&:checked { 1697border-image: radial-gradient(circle closest-corner at center calc(100% - 1px), 1698$primary 100%, 1699transparent 100%) 17000 0 2 / 0 0 2px; 1701color: $on-surface; 1702 1703&, 1704&:disabled { 1705background-color: transparent; 1706} 1707} 1708 1709label:not(:only-child) { 1710&:first-child { 1711margin-left: 0; 1712} 1713 1714&:last-child { 1715margin-right: 0; 1716} 1717} 1718 1719&.text-button { 1720min-width: 0; 1721} 1722 1723&.slider-button { 1724padding-left: (24px - 16px) / 2; 1725padding-right: (24px - 16px) / 2; 1726} 1727} 1728 1729/** 1730* Tree Views 1731*/ 1732 1733columnview.view, 1734treeview.view { 1735border-left-color: stroke($on-surface); // this is actually the tree lines color, 1736border-top-color: divider($on-surface); // while this is the grid lines color, better then nothing 1737 1738// to avoid borders being overridden by the previously set props 1739> rubberband { 1740@extend rubberband; 1741} 1742 1743// FIXME: Avoid transparency background-color being slightly darker 1744&:selected { 1745// background-color: $surface-z1; 1746// background-image: image($overlay-selected); 1747} 1748 1749&:hover, 1750&:selected { 1751// border-radius: 0; 1752} 1753 1754&.separator { 1755min-height: 1px + 2px * 2; 1756color: divider($on-surface); 1757} 1758 1759&:drop(active) { 1760box-shadow: none; 1761} 1762 1763> dndtarget:drop(active) { 1764// FIXME: box-shadow, background-color and background-image are not available here. 1765border-style: solid none; 1766border-width: 9999px; 1767border-color: overlay("hover", $on-surface); 1768 1769&.after { 1770border-top-style: none; 1771} 1772 1773&.before { 1774border-bottom-style: none; 1775} 1776} 1777 1778&.expander { 1779// GtkTreeView uses the larger of the expander’s min-width and min-height 1780min-width: 16px; 1781min-height: 16px; 1782-gtk-icon-source: -gtk-icontheme('pan-down-symbolic'); 1783-gtk-icon-transform: rotate(-90deg); 1784 1785&:dir(rtl) { 1786-gtk-icon-transform: rotate(90deg); 1787} 1788 1789&:checked { 1790-gtk-icon-transform: unset; 1791} 1792 1793color: hint($on-surface); 1794 1795&:hover, 1796&:active { 1797color: $on-surface; 1798} 1799 1800&:disabled { 1801color: disabled-hint($on-surface); 1802} 1803} 1804 1805&.progressbar { // progress bar in treeviews 1806border-bottom: $bar-size solid $primary; 1807background-color: transparent; 1808 1809&:selected:hover { 1810background-color: transparent; 1811} 1812} 1813 1814&.trough { // progress bar trough in treeviews 1815border-bottom: $bar-size solid disabled-stroke($on-surface); 1816background-color: transparent; 1817 1818&:selected:hover { 1819background-color: transparent; 1820} 1821} 1822 1823> header { 1824> button { 1825padding: 2px 6px; 1826border-style: none solid solid none; 1827border-width: 1px; 1828border-color: divider($on-surface); 1829border-radius: 0; 1830background-clip: padding-box; 1831background-color: transparent; 1832color: hint($on-surface); 1833@include ink-color($on-surface, $hover-alt: true, $button-style: "flat"); 1834@include list-item; 1835 1836&:disabled { 1837color: disabled-hint($on-surface); 1838} 1839 1840&, 1841&:disabled { 1842// background-color: $surface-z1; 1843} 1844 1845&:last-child { 1846border-right-style: none; 1847} 1848} 1849} 1850 1851button.dnd, 1852header.button.dnd { // for treeview-like derive widgets 1853padding: 2px 6px; 1854border-style: none solid solid; 1855border-width: 1px; 1856border-color: divider($on-surface); 1857border-radius: 0; 1858box-shadow: none; 1859// background-color: $surface-z1; 1860background-clip: border-box; 1861color: $primary; 1862} 1863 1864// see tests/testaccel to test 1865acceleditor > label { 1866background-color: $primary; 1867} 1868} 1869 1870/** 1871* Menus 1872*/ 1873 1874menubar { 1875// box-shadow: inset 0 -1px divider($on-surface); 1876background-color: $titlebar; 1877color: $on-titlebar; 1878 1879&:backdrop { 1880background-color: $titlebar-backdrop; 1881color: hint($on-titlebar); 1882} 1883 1884.csd & { 1885transition: $transition; 1886} 1887 1888> item { 1889// transition: $transition; 1890min-height: 20px; 1891padding: 4px 8px; 1892color: hint($on-titlebar); 1893 1894@extend %ripple; 1895// @include ink-color($on-titlebar); 1896 1897&:hover { 1898background-color: overlay("hover", $on-titlebar); 1899} 1900 1901&:focus:not(:hover) { 1902background-color: overlay("focus", $on-titlebar); 1903} 1904 1905&:active { 1906background-image: radial-gradient(circle, overlay("pressed", $on-titlebar) 10%, transparent 10%); 1907} 1908 1909&:selected:not(:focus) { 1910transition: none; 1911background-color: overlay("activated", $on-titlebar); 1912color: $on-titlebar; 1913} 1914 1915&:disabled { 1916color: disabled-hint($on-titlebar); 1917} 1918} 1919} 1920 1921popover.menu { 1922> contents { 1923padding: 6px 0; 1924} 1925 1926separator { 1927margin: 6px 0; 1928} 1929 1930label.title { 1931min-height: 32px - 4px * 2; 1932padding: 4px 32px; // this will fall apart with font sizing 1933font-weight: bold; 1934} 1935 1936modelbutton { 1937// transition: background-color $duration $ease-out; 1938min-height: 30px - 4px * 2; 1939min-width: 40px; 1940padding: 4px 32px; 1941 1942&:hover { 1943// transition: none; 1944// background-color: overlay("hover", $on-surface); 1945} 1946 1947&:disabled { 1948color: disabled($on-surface); 1949} 1950 1951accelerator { 1952color: hint($on-surface); 1953 1954&:dir(ltr) { 1955margin-left: 24px; 1956margin-right: 16px - 32px; 1957} 1958 1959&:dir(rtl) { 1960margin-left: 16px - 32px; 1961margin-right: 24px; 1962} 1963} 1964 1965&:disabled accelerator { 1966color: disabled-hint($on-surface); 1967} 1968} 1969 1970check, 1971radio { 1972&, 1973&:focus, 1974&:hover, 1975&:active, 1976&:disabled { 1977// transition: none; 1978background-color: transparent; 1979background-image: none; 1980} 1981} 1982 1983arrow, 1984check, 1985radio { 1986min-width: 16px; 1987min-height: 16px; 1988margin: 0; 1989padding: 0; 1990 1991&.left { 1992margin-left: 8px - 32px; 1993margin-right: 8px; 1994} 1995 1996&.right { 1997margin-left: 8px; 1998margin-right: 8px - 32px; 1999} 2000} 2001 2002button.model { 2003@extend %button-flat; 2004 2005// min-height: 32px; 2006// padding: 0 8px; 2007// border-radius: $corner-radius; 2008 2009&:checked { 2010// color: $primary; 2011} 2012} 2013 2014box.inline-buttons { 2015padding: 0 8px; 2016 2017button.image-button.model { 2018} 2019} 2020 2021box.circular-buttons { 2022padding: 4px 32px; 2023 2024button.circular.image-button.model { 2025padding: 12px; 2026} 2027} 2028} 2029 2030/** 2031* Popovers 2032*/ 2033 2034popover { 2035font: initial; // Decouple the font of popovers from their entry/textview 2036 2037&.background { 2038background-color: transparent; 2039} 2040 2041> arrow, 2042> contents { 2043transition: $transition-shadow; 2044box-shadow: $shadow-z4; 2045background-color: $surface-z8; 2046color: $on-surface; 2047 2048&:backdrop { 2049box-shadow: $shadow-z2; 2050} 2051} 2052 2053@at-root %popover-border { 2054border-width: 1px; 2055border-style: solid; 2056border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.2) rgba(0, 0, 0, 0.3); 2057background-clip: padding-box; 2058} 2059 2060> arrow { 2061@extend %popover-border; 2062} 2063 2064> contents { 2065padding: 8px; 2066 2067@if $version >= 4.2 { 2068border-radius: $corner-radius; 2069} @else { 2070@extend %popover-border; 2071border-radius: $corner-radius + 1px; 2072} 2073 2074> list, 2075.view, 2076> .toolbar { 2077border-style: none; 2078box-shadow: none; 2079background-color: transparent; 2080} 2081 2082separator { 2083// margin: 4px 0; 2084} 2085 2086list separator { 2087// margin: 0; 2088} 2089} 2090 2091.osd &, 2092&.touch-selection, 2093&.magnifier { 2094// @extend %osd; 2095} 2096 2097button { 2098@extend %button-outlined; 2099} 2100 2101frame, 2102.frame { 2103border: 1px solid divider($on-surface); 2104box-shadow: none; 2105background-color: transparent; 2106} 2107 2108.linked:not(.vertical) > entry:not(:only-child) { 2109// border-radius: $corner-radius $corner-radius 0 0; 2110} 2111} 2112 2113/** 2114* Notebooks 2115*/ 2116 2117notebook { 2118&:focus:focus-visible > header > tabs > tab:checked { 2119background-color: overlay("focus", $primary); 2120} 2121 2122> header { 2123&.top { 2124box-shadow: inset 0 -1px divider($on-surface); 2125 2126> tabs { 2127> tab { 2128box-shadow: inset 0 -2px transparent; 2129 2130&:checked { 2131box-shadow: inset 0 -2px $primary; 2132} 2133} 2134} 2135} 2136 2137&.bottom { 2138box-shadow: inset 0 1px divider($on-surface); 2139 2140> tabs { 2141> tab { 2142box-shadow: inset 0 2px transparent; 2143 2144&:checked { 2145box-shadow: inset 0 2px $primary; 2146} 2147} 2148} 2149} 2150 2151&.left { 2152box-shadow: inset -1px 0 divider($on-surface); 2153 2154> tabs { 2155> tab { 2156box-shadow: inset -2px 0 transparent; 2157 2158&:checked { 2159box-shadow: inset -2px 0 $primary; 2160} 2161} 2162} 2163} 2164 2165&.right { 2166box-shadow: inset 1px 0 divider($on-surface); 2167 2168> tabs { 2169> tab { 2170box-shadow: inset 2px 0 transparent; 2171 2172&:checked { 2173box-shadow: inset 2px 0 $primary; 2174} 2175} 2176} 2177} 2178 2179&.top > tabs > arrow { 2180@extend %notebook_vert_arrows; 2181} 2182 2183&.bottom > tabs > arrow { 2184@extend %notebook_vert_arrows; 2185} 2186 2187@at-root %notebook_vert_arrows { 2188&.down { 2189-gtk-icon-source: -gtk-icontheme('pan-start-symbolic'); 2190} 2191 2192&.up { 2193-gtk-icon-source: -gtk-icontheme('pan-end-symbolic'); 2194} 2195} 2196 2197&.left > tabs > arrow { 2198@extend %notebook_horz_arrows; 2199} 2200 2201&.right > tabs > arrow { 2202@extend %notebook_horz_arrows; 2203} 2204 2205@at-root %notebook_horz_arrows { 2206&.down { 2207-gtk-icon-source: -gtk-icontheme('pan-up-symbolic'); 2208} 2209 2210&.up { 2211-gtk-icon-source: -gtk-icontheme('pan-down-symbolic'); 2212} 2213} 2214 2215> tabs > arrow { 2216min-height: 16px; 2217min-width: 16px; 2218padding: 4px; 2219border-radius: 0; 2220color: hint($on-surface); 2221@extend %ripple; 2222@include ink-color($on-surface, $hover-alt: true); 2223 2224&:disabled { 2225color: disabled-hint($on-surface); 2226} 2227} 2228 2229> tabs > tab { 2230@extend %ripple; 2231@include ink-color($on-surface, $hover-alt: true); 2232min-height: $small-size; 2233min-width: $small-size; 2234padding: $container-padding 12px; 2235color: hint($on-surface); 2236font-weight: 500; 2237 2238&:hover { 2239// background-color: overlay("hover-alt", $on-surface); 2240} 2241 2242&:active { 2243// background-image: radial-gradient(circle, overlay("pressed", $on-surface) 10%, transparent 10%); 2244} 2245 2246&:disabled { 2247color: disabled-hint($on-surface); 2248} 2249 2250&:checked { 2251@include ink-color($primary, $hover-alt: true); 2252color: $primary; 2253 2254&:hover { 2255// background-color: overlay("hover-alt", $primary); 2256} 2257 2258&:active { 2259// background-image: radial-gradient(circle, overlay("pressed", $primary) 10%, transparent 10%); 2260} 2261 2262&:disabled { 2263color: disabled-hint($on-surface); 2264} 2265 2266&.reorderable-page { 2267// border-color: divider($on-surface); 2268// background-color: $surface-z1; 2269} 2270} 2271 2272// FIXME: The tab node doesn't have :drop(active), instead its child box has it. 2273> box { 2274transition: background-color $duration $ease-out; 2275margin: -$container-padding -12px; 2276padding: $container-padding 12px; 2277 2278&:drop(active) { 2279background-color: overlay("hover", $on-surface); 2280} 2281} 2282 2283// colors the button like the label, overridden otherwise 2284button.flat { 2285@extend %button-small; 2286 2287&:last-child { 2288margin-left: $container-padding; 2289margin-right: $container-padding - 12px; 2290} 2291 2292&:first-child { 2293margin-left: $container-padding - 12px; 2294margin-right: $container-padding; 2295} 2296} 2297} 2298} 2299} 2300 2301/** 2302* Scrollbars 2303*/ 2304 2305scrollbar { 2306$_slider_min_length: 24px; 2307 2308transition: $transition; 2309background-clip: padding-box; 2310// background-color: $surface-z1; 2311 2312// scrollbar border 2313&.top { border-bottom: 1px solid divider($on-surface); } 2314&.bottom { border-top: 1px solid divider($on-surface); } 2315&.left { border-right: 1px solid divider($on-surface); } 2316&.right { border-left: 1px solid divider($on-surface); } 2317 2318// slider 2319> range > trough > slider { 2320transition: background-color $duration $ease-out; 2321min-width: 10px; 2322min-height: 10px; 2323border: 3px solid transparent; 2324border-radius: $circular-radius; 2325background-clip: padding-box; 2326background-color: scrollbar-thumb($on-surface); 2327 2328&:hover { 2329background-color: scrollbar-thumb($on-surface, "hover"); 2330} 2331 2332&:active { 2333background-color: scrollbar-thumb($on-surface, "pressed"); 2334} 2335 2336&:disabled { 2337background-color: scrollbar-thumb($on-surface, "disabled"); 2338} 2339} 2340 2341&.horizontal > range > trough > slider { 2342min-width: $_slider_min_length; 2343} 2344 2345&.vertical > range > trough > slider { 2346min-height: $_slider_min_length; 2347} 2348 2349> range.fine-tune { 2350> trough > slider { 2351min-width: 4px; 2352min-height: 4px; 2353} 2354 2355&.horizontal > trough > slider { 2356margin: 3px 0; 2357} 2358 2359&.vertical > trough > slider { 2360margin: 0 3px; 2361} 2362} 2363 2364&.overlay-indicator { 2365> range:not(.fine-tune) > trough > slider { 2366transition-property: background-color, min-height, min-width; 2367} 2368 2369&:not(.dragging):not(.hovering) { 2370border-color: transparent; 2371background-color: transparent; 2372 2373> range > trough > slider { 2374min-width: 4px; 2375min-height: 4px; 2376margin: 3px - 1px; 2377border: 1px solid rgba($surface-z1, 0.3); 2378} 2379 2380&.horizontal > range > trough > slider { 2381min-width: $_slider_min_length; 2382} 2383 2384&.vertical > range > trough > slider { 2385min-height: $_slider_min_length; 2386} 2387} 2388 2389&.dragging, 2390&.hovering { 2391background-color: $surface-z8; 2392} 2393} 2394} 2395 2396/** 2397* Switch 2398*/ 2399 2400switch { 2401transition: all $duration $ease-out; 2402margin: $container-padding 0; 2403padding: 0 2px; 2404border: 5px solid transparent; 2405border-radius: $circular-radius; 2406background-color: stroke($on-surface); 2407background-clip: padding-box; 2408font-size: 0; 2409 2410&:checked { 2411background-color: rgba($primary, .5); 2412} 2413 2414&:disabled { 2415opacity: .5; 2416} 2417 2418// hide on/off icons for >=3.24.5 2419> image { 2420margin: -8px; 2421-gtk-icon-transform: scale(0); 2422} 2423 2424> slider { 2425transition: all $duration $ease-out; 2426min-width: 20px; 2427min-height: 20px; 2428margin: -3px -2px; 2429border-radius: $circular-radius; 2430box-shadow: 24310 0 0 10px transparent, 24320 0 0 -10px overlay("pressed", $on-surface), 2433$shadow-z1; 2434background-color: $surface-switch-thumb; 2435} 2436 2437&:hover > slider { 2438box-shadow: 24390 0 0 10px overlay("hover", $on-surface), 24400 0 0 -10px overlay("pressed", $on-surface), 2441$shadow-z1; 2442} 2443 2444&:focus > slider { 2445box-shadow: 24460 0 0 10px overlay("focus", $on-surface), 24470 0 0 -10px overlay("pressed", $on-surface), 2448$shadow-z1; 2449} 2450 2451&:active > slider { 2452box-shadow: 24530 0 0 10px overlay("hover", $on-surface), 24540 0 0 10px overlay("pressed", $on-surface), 2455$shadow-z1; 2456} 2457 2458&:checked > slider { 2459background-color: $primary; 2460} 2461 2462&:checked:hover > slider { 2463box-shadow: 24640 0 0 10px overlay("hover", $primary), 24650 0 0 -10px overlay("pressed", $primary), 2466$shadow-z1; 2467} 2468 2469&:checked:focus > slider { 2470box-shadow: 24710 0 0 10px overlay("focus", $primary), 24720 0 0 -10px overlay("pressed", $primary), 2473$shadow-z1; 2474} 2475 2476&:checked:active > slider { 2477box-shadow: 24780 0 0 10px overlay("hover", $primary), 24790 0 0 10px overlay("pressed", $primary), 2480$shadow-z1; 2481} 2482 2483row:selected & { 2484} 2485} 2486 2487/** 2488* Check and Radio items 2489*/ 2490 2491// draw regular check and radio items using our PNG assets 2492// all assets are rendered from assets.svg. never add pngs directly 2493 2494// selection-mode 2495.view.content-view.check:not(list), 2496.content-view:not(list) .tile check { 2497min-height: 40px; 2498min-width: 40px; 2499margin: 0; 2500padding: 0; 2501background-color: transparent; 2502background-image: none; 2503-gtk-icon-shadow: $icon-shadow-z2; 2504 2505&:hover, 2506&:active { 2507-gtk-icon-shadow: $icon-shadow-z4; 2508} 2509 2510@each $class, $suffix in ("": "-unchecked", ":checked": "-checked") { 2511&#{$class} { 2512$_url: 'assets/selectionmode-checkbox#{$suffix}#{$asset-suffix}'; 2513 2514-gtk-icon-source: -gtk-scaled(url("#{$_url}.png"), url("#{$_url}@2.png")); 2515} 2516} 2517} 2518 2519checkbutton, 2520radiobutton { 2521border-spacing: 4px; 2522 2523&.text-button { 2524padding: 4px; 2525} 2526} 2527 2528$check-radio-size: 40px; 2529 2530check, 2531radio { 2532min-height: 24px; 2533min-width: 24px; 2534margin: -($check-radio-size - 24px) / 2; 2535padding: ($check-radio-size - 24px) / 2; 2536border-radius: $circular-radius; 2537color: hint($on-surface); 2538@extend %ripple; 2539@include ink-color($on-surface); 2540 2541&:checked, 2542&:indeterminate { 2543color: $primary; 2544@include ink-color($primary); 2545} 2546 2547&:disabled { 2548color: disabled-hint($on-surface); 2549} 2550} 2551 2552%check, 2553check { 2554-gtk-icon-source: -gtk-recolor(url("icons/checkbox-unchecked-symbolic.svg")); 2555 2556&:checked { 2557-gtk-icon-source: -gtk-recolor(url("icons/checkbox-checked-symbolic.svg")); 2558} 2559 2560&:indeterminate { 2561-gtk-icon-source: -gtk-recolor(url("icons/checkbox-mixed-symbolic.svg")); 2562} 2563} 2564 2565%radio, 2566radio { 2567-gtk-icon-source: -gtk-recolor(url("icons/radio-unchecked-symbolic.svg")); 2568 2569&:checked { 2570// -gtk-icon-source: -gtk-recolor(url("icons/radio-checked-symbolic.svg")); 2571} 2572 2573&:indeterminate { 2574-gtk-icon-source: -gtk-recolor(url("icons/radio-mixed-symbolic.svg")); 2575} 2576 2577border-image-slice: $check-radio-size / 2px; 2578border-image-width: $check-radio-size / 2; 2579 2580$radio-indicator-size: 10px / $check-radio-size / 2; 2581 2582border-image-source: radial-gradient(circle, $primary 0%, transparent 0%); 2583 2584&:checked:not(:indeterminate) { 2585border-image-source: radial-gradient(circle, $primary 4.5px, transparent 5px); 2586 2587&:disabled { 2588border-image-source: radial-gradient(circle, disabled-hint($on-surface) 4.5px, transparent 5px); 2589} 2590} 2591} 2592 2593%small_check, 2594popover.menu modelbutton check { 2595min-height: 16px; 2596min-width: 16px; 2597border-radius: $corner-radius; 2598-gtk-icon-source: -gtk-recolor(url("icons/small-checkbox-unchecked-symbolic.svg")); 2599 2600&:checked { 2601-gtk-icon-source: -gtk-recolor(url("icons/small-checkbox-checked-symbolic.svg")); 2602} 2603 2604&:indeterminate { 2605-gtk-icon-source: -gtk-recolor(url("icons/small-checkbox-mixed-symbolic.svg")); 2606} 2607} 2608 2609%small_radio, 2610popover.menu modelbutton radio { 2611min-height: 16px; 2612min-width: 16px; 2613border-image: none; 2614-gtk-icon-source: -gtk-recolor(url("icons/small-radio-unchecked-symbolic.svg")); 2615 2616&:checked { 2617-gtk-icon-source: -gtk-recolor(url("icons/small-radio-checked-symbolic.svg")); 2618} 2619 2620&:indeterminate { 2621-gtk-icon-source: -gtk-recolor(url("icons/small-radio-mixed-symbolic.svg")); 2622} 2623} 2624 2625// ANIMATION: 2626// this is made with those pretty convoluted transitions, since checks and radios have to animate only on state changes, 2627// the transformation is set on the active state and it get reset on the checked state. 2628radio:not(:checked):active { 2629// -gtk-icon-transform: scale(0); 2630} 2631 2632// Otherwise, treeview.view styling will be applied... 2633treeview.view check, 2634treeview.view radio { 2635padding: 0; 2636color: hint($on-surface); 2637 2638&:checked, 2639&:indeterminate { 2640color: $primary; 2641} 2642 2643&:disabled { 2644color: disabled-hint($on-surface); 2645} 2646 2647&, 2648&:hover, 2649&:selected, 2650&:selected:hover { 2651background-color: transparent; 2652} 2653} 2654 2655treeview.view radio:checked { 2656-gtk-icon-source: -gtk-recolor(url("icons/radio-checked-symbolic.svg")); 2657border-image: none; 2658} 2659 2660/** 2661* GtkScale 2662*/ 2663 2664scale { 2665// sizing 2666$_marks_length: 8px; 2667$_marks_distance: 7px; 2668 2669$trough_size: 2px; 2670$finetune_trough_size: 4px; 2671 2672$slider_size: 32px; 2673 2674$slider_margin: -($slider_size - $trough_size) / 2; 2675$finetune_slider_margin: -($slider_size - $finetune_trough_size) / 2; 2676 2677$color_slider_margin: -($slider_size) * 3 / 4; 2678$color_marks_slider_margin: -($slider_size - 16px) - $color_slider_margin; 2679 2680min-height: $trough_size; 2681min-width: $trough_size; 2682 2683&.horizontal { 2684padding: ($medium-size - $trough_size) / 2 12px; 2685} 2686 2687&.vertical { 2688padding: 12px ($medium-size - $trough_size) / 2; 2689} 2690 2691// click-and-hold the slider to activate 2692&.fine-tune { 2693&.horizontal { 2694min-height: $finetune_trough_size; 2695padding-top: ($medium-size - $finetune_trough_size) / 2; 2696padding-bottom: ($medium-size - $finetune_trough_size) / 2; 2697} 2698 2699&.vertical { 2700min-width: $finetune_trough_size; 2701padding-left: ($medium-size - $finetune_trough_size) / 2; 2702padding-right: ($medium-size - $finetune_trough_size) / 2; 2703} 2704 2705// to make the trough grow in fine-tune mode 2706> trough > slider { 2707margin: $finetune_slider_margin; 2708} 2709} 2710 2711// the backing bit 2712> trough { 2713transition: background-color $duration $ease-out; 2714background-color: stroke($on-surface); 2715 2716&:disabled { 2717background-color: disabled-stroke($on-surface); 2718} 2719 2720// the colored part of the backing bit 2721> highlight { 2722transition: background-image $duration $ease-out; 2723background-image: image($primary); 2724 2725&:disabled { 2726background-color: $surface-z0; 2727background-image: image(disabled-hint($on-surface)); 2728} 2729} 2730 2731// this is another differently styled part of the backing bit, the most relevant use case is for example 2732// in media player to indicate how much video stream as been cached 2733> fill { 2734transition: background-color $duration $ease-out; 2735background-color: stroke($on-surface); 2736 2737&:disabled { 2738background-color: transparent; 2739} 2740} 2741 2742> slider { 2743transition: background-color $duration $ease-out, 2744background-size $ripple-fade-out-duration $ease-out, 2745background-image $ripple-fade-out-opacity-duration $ease-out; 2746min-width: $slider_size; 2747min-height: $slider_size; 2748// the slider is inside the trough, so to have make it bigger there's a negative margin 2749margin: $slider_margin; 2750border-radius: 50%; 2751background-repeat: no-repeat; 2752background-position: center; 2753background-size: auto, 1000% 1000%; 2754color: $primary; 2755 2756@each $class, $suffix in ("": "", ":disabled": "-disabled") { 2757&#{$class} { 2758$_url: 'assets/scale-slider#{$suffix}#{$asset-suffix}'; 2759 2760background-image: -gtk-scaled(url('#{$_url}.png'), url('#{$_url}@2.png')), 2761radial-gradient(circle, transparent 10%, transparent 10%); 2762} 2763} 2764 2765&:hover { 2766background-color: overlay("hover", $primary); 2767} 2768 2769&:focus { 2770background-color: overlay("focus", $primary); 2771} 2772 2773&:active { 2774$_url: 'assets/scale-slider#{$asset-suffix}'; 2775 2776transition: background-color $duration $ease-out, 2777background-size 0ms, 2778background-image 0ms; 2779animation: ripple-on-slider $ripple-fade-in-duration $ease-out forwards; 2780background-image: -gtk-scaled(url('#{$_url}.png'), url('#{$_url}@2.png')), 2781radial-gradient(circle, overlay("pressed", $primary) 10%, transparent 10%); 2782background-size: auto, 0% 0%; 2783} 2784} 2785} 2786 2787> marks, 2788> value { 2789color: hint($on-surface); 2790} 2791 2792> value { 2793font-feature-settings: "tnum"; 2794} 2795 2796indicator { 2797background-color: stroke($on-surface); 2798} 2799 2800//marks margins 2801@each $scale_orient, $marks_class, $marks_pos, $marks_margin in (horizontal, top, top, bottom), 2802(horizontal, bottom, bottom, top), 2803(vertical, top, left, right), 2804(vertical, bottom, right, left) { 2805&.#{$scale_orient} > marks { 2806&.#{$marks_class} { 2807margin-#{$marks_margin}: $_marks_distance; 2808margin-#{$marks_pos}: -($_marks_distance + $_marks_length); 2809} 2810} 2811 2812&.#{$scale_orient}.fine-tune > marks { 2813&.#{$marks_class} { 2814margin-#{$marks_margin}: $_marks_distance - 1px; 2815margin-#{$marks_pos}: -($_marks_distance + $_marks_length - 1px); 2816} 2817} 2818} 2819 2820&.horizontal { 2821indicator { 2822min-height: $_marks_length; 2823min-width: 1px; 2824} 2825} 2826 2827&.vertical { 2828indicator { 2829min-height: 1px; 2830min-width: $_marks_length; 2831} 2832} 2833 2834// *WARNING* scale with marks madness following 2835 2836@each $dir_class, $dir_infix in (".horizontal": "-horz", ".vertical": "-vert") { 2837@each $marks_class, $marks_infix in ( 2838".marks-before:not(.marks-after)": "-marks-before", 2839".marks-after:not(.marks-before)": "-marks-after" 2840) { 2841&#{$dir_class}#{$marks_class} > trough > slider { 2842@each $state_class, $state_infix in ("": "", ":disabled": "-disabled") { 2843&#{$state_class} { 2844$_scale_asset: 'assets/scale#{$dir_infix}#{$marks_infix}-slider#{$state_infix}#{$asset-suffix}'; 2845 2846background-image: 2847-gtk-scaled(url('#{$_scale_asset}.png'), url('#{$_scale_asset}@2.png')), 2848radial-gradient(circle, transparent 10%, transparent 10%); 2849} 2850} 2851 2852&:active { 2853$_scale_asset: 'assets/scale#{$dir_infix}#{$marks_infix}-slider#{$asset-suffix}'; 2854 2855background-image: 2856-gtk-scaled(url('#{$_scale_asset}.png'), url('#{$_scale_asset}@2.png')), 2857radial-gradient(circle, overlay("pressed", $primary) 10%, transparent 10%); 2858} 2859} 2860} 2861} 2862 2863&.color { 2864min-height: 0; 2865min-width: 0; 2866 2867&.horizontal { 2868// specificity bump 2869&:dir(ltr), 2870&:dir(rtl) { 2871padding: 0 0 12px 0; 2872 2873slider { 2874margin-bottom: $color_slider_margin; 2875margin-top: $color_marks_slider_margin; 2876} 2877} 2878} 2879 2880&.vertical { 2881&:dir(ltr) { 2882padding: 0 0 0 12px; 2883 2884slider { 2885margin-left: $color_slider_margin; 2886margin-right: $color_marks_slider_margin; 2887} 2888} 2889 2890&:dir(rtl) { 2891padding: 0 12px 0 0; 2892 2893slider { 2894margin-right: $color_slider_margin; 2895margin-left: $color_marks_slider_margin; 2896} 2897} 2898} 2899} 2900} 2901 2902/** 2903* Progress bars 2904*/ 2905 2906progressbar { 2907// FIXME: insensitive state missing and some other state should be set probably 2908color: hint($on-surface); 2909font-size: smaller; 2910font-feature-settings: "tnum"; 2911 2912> trough { 2913background-color: disabled-stroke($on-surface); 2914 2915> progress { 2916background-color: $primary; 2917} 2918} 2919 2920// sizing 2921&.horizontal > trough { 2922min-width: 150px; 2923 2924&, 2925> progress { 2926min-height: $bar-size; 2927} 2928} 2929 2930&.vertical > trough { 2931min-height: 80px; 2932 2933&, 2934> progress { 2935min-width: $bar-size; 2936} 2937} 2938 2939// progressbar.osd used for epiphany page loading progress 2940&.osd { 2941// min-width: $bar-size; 2942// min-height: $bar-size; 2943// background-color: transparent; 2944 2945> trough { 2946// background-color: transparent; 2947 2948> progress { 2949// background-color: $primary; 2950} 2951} 2952} 2953 2954// makes the progress indicator disappear, when the fraction is 0 2955> trough.empty > progress { 2956all: unset; 2957} 2958} 2959 2960/** 2961* Level Bar 2962*/ 2963 2964levelbar { 2965&.horizontal { 2966> trough > block { 2967min-height: $bar-size; 2968} 2969 2970&.discrete > trough > block { 2971min-width: $medium-size; 2972 2973&:not(:last-child) { 2974margin-right: 2px; 2975} 2976} 2977} 2978 2979&.vertical { 2980> trough > block { 2981min-width: $bar-size; 2982} 2983 2984&.discrete > trough > block { 2985min-height: $medium-size; 2986 2987&:not(:last-child) { 2988margin-bottom: 2px; 2989} 2990} 2991} 2992 2993> trough { 2994} 2995 2996> trough > block { 2997&.low { 2998background-color: $warning; 2999} 3000 3001&.high, 3002&:not(.empty) { 3003background-color: $primary; 3004} 3005 3006&.full { 3007background-color: $success; 3008} 3009 3010&.empty { 3011background-color: disabled-stroke($on-surface); 3012} 3013} 3014} 3015 3016/** 3017* Print dialog 3018*/ 3019 3020window.dialog.print { 3021paper { 3022// padding: 0; 3023// border: 1px solid divider($on-surface); 3024border-radius: $corner-radius; 3025box-shadow: $shadow-z1; 3026background-color: $surface-z1; 3027color: $on-surface; 3028} 3029 3030.dialog-action-box { 3031margin: 12px; 3032} 3033} 3034 3035/** 3036* Frames 3037*/ 3038 3039frame, 3040.frame { 3041// border: 1px solid divider($on-surface); 3042border-radius: $corner-radius; 3043box-shadow: $shadow-z1; 3044background-color: $surface-z1; 3045color: $on-surface; 3046 3047button { 3048@extend %button-outlined; 3049} 3050} 3051 3052frame > label { 3053margin: 4px; 3054} 3055 3056statusbar { 3057padding: 6px 10px; 3058// border-top: 1px solid divider($on-surface); 3059} 3060 3061actionbar > revealer > box { 3062padding: $container-padding; 3063border-spacing: $container-padding; 3064border-top: 1px solid divider($on-surface); 3065// background-clip: border-box; 3066 3067button:not(.suggested-action):not(.destructive-action) { 3068@extend %button-flat; 3069} 3070 3071.linked:not(.vertical) > entry:not(:only-child) { 3072border-radius: $corner-radius $corner-radius 0 0; 3073} 3074} 3075 3076scrolledwindow { 3077// This is used when content is touch-dragged past boundaries. 3078// draws a box on top of the content, the size changes programmatically. 3079@at-root overshoot { 3080&.top { @include overshoot(top); } 3081 3082&.bottom { @include overshoot(bottom); } 3083 3084&.left { @include overshoot(left); } 3085 3086&.right { @include overshoot(right); } 3087} 3088 3089// Overflow indication, works similarly to the overshoot, the size if fixed tho. 3090@at-root undershoot { 3091// &.top { @include undershoot(top); } 3092 3093// &.bottom { @include undershoot(bottom); } 3094 3095// &.left { @include undershoot(left); } 3096 3097// &.right { @include undershoot(right); } 3098} 3099 3100// the small square between two scrollbars 3101@at-root junction { 3102border-style: solid none none solid; 3103border-width: 1px; 3104border-color: divider($on-surface); 3105// background-color: $surface-z1; 3106 3107&:dir(rtl) { 3108border-style: solid solid none none; 3109} 3110} 3111} 3112 3113// vbox and hbox separators 3114separator { 3115min-width: 1px; 3116min-height: 1px; 3117background-color: divider($on-surface); 3118} 3119 3120%hide_separators { 3121min-width: 0; 3122min-height: 0; 3123background-color: transparent; 3124} 3125 3126/** 3127* Lists 3128*/ 3129 3130listview, 3131list { 3132// background-color: $surface-z1; 3133// color: $on-surface; 3134 3135> row { 3136padding: 2px; 3137 3138&.expander { 3139padding: 0; 3140 3141.row-header { 3142padding: 2px; 3143} 3144} 3145} 3146 3147&.separators:not(.horizontal) > row:not(:first-child) { 3148border-top: 1px solid divider($on-surface); 3149} 3150 3151&.separators.horizontal > row:not(:first-child) { 3152border-left: 1px solid divider($on-surface); 3153} 3154} 3155 3156row { 3157background-clip: padding-box; 3158 3159&.activatable { 3160@extend %ripple; 3161@include ink-color($on-surface, $hover-alt: true); 3162@include list-item; 3163 3164// this is for indicathing which row generated a popover 3165// see https://bugzilla.gnome.org/show_bug.cgi?id=754411 3166&.has-open-popup { 3167background-color: overlay("activated", $on-surface); 3168} 3169} 3170 3171&:selected { 3172background-color: $overlay-selected; 3173 3174@include ink-color($primary, $hover-alt: true, $on: $overlay-selected); 3175 3176&.has-open-popup { 3177background-color: overlay("activated", $primary, $on: $overlay-selected); 3178} 3179} 3180} 3181 3182listview { 3183> row { 3184@extend %ripple; 3185@include ink-color($on-surface, $hover-alt: true); 3186@include list-item; 3187} 3188 3189&:selected { 3190background-color: $overlay-selected; 3191 3192@include ink-color($primary, $hover-alt: true, $on: $overlay-selected); 3193} 3194} 3195 3196columnview { 3197// move padding to child cells 3198> listview > row { 3199padding: 0; 3200 3201// align horizontal sizing with header buttons 3202> cell { 3203min-height: 24px; 3204padding: 4px 6px; 3205 3206&:not(:last-child) { 3207border-right: 1px solid transparent; 3208} 3209} 3210} 3211 3212// make column separators visible when :show-column-separators is true 3213&.column-separators > listview > row > cell { 3214border-right-color: divider($on-surface); 3215} 3216 3217// shrink vertically for .data-table 3218&.data-table > listview > row > cell { 3219padding-top: 2px; 3220padding-bottom: 2px; 3221} 3222} 3223 3224// rich lists usually containing other widgets than just labels/text 3225.rich-list { 3226> row { 3227padding: 12px; 3228min-height: $medium-size; 3229 3230> box { 3231border-spacing: 12px; 3232} 3233} 3234} 3235 3236/** 3237* App Notifications 3238*/ 3239 3240.app-notification { 3241@extend %toolbar-osd; 3242margin: 8px; 3243border-style: none; 3244 3245button { 3246@extend %button-flat; 3247 3248&.text-button:not(:disabled) { 3249color: $primary; 3250@include ink-color($primary); 3251} 3252} 3253} 3254 3255/** 3256* Expanders 3257*/ 3258 3259expander { 3260transition: all $duration $ease-out; 3261min-width: 16px; 3262min-height: 16px; 3263padding: 4px; 3264border-radius: $circular-radius; 3265color: hint($on-surface); 3266-gtk-icon-source: -gtk-icontheme('pan-down-symbolic'); 3267 3268@extend %ripple; 3269@include ink-color($on-surface); 3270 3271&:disabled { 3272color: disabled-hint($on-surface); 3273} 3274 3275&:checked { 3276&:dir(ltr) { 3277-gtk-icon-transform: rotate(-180deg); 3278} 3279 3280&:dir(rtl) { 3281-gtk-icon-transform: rotate(180deg); 3282} 3283} 3284} 3285 3286indent { 3287min-width: 16px; 3288min-height: 16px; 3289padding: 4px; 3290} 3291 3292expander-widget { 3293&:focus > box > title > expander { 3294box-shadow: inset 0 0 0 9999px overlay("focus", $on-surface); 3295} 3296 3297> box > title:drop(active) > expander, 3298> box > title:hover > expander { 3299box-shadow: inset 0 0 0 9999px overlay("hover", $on-surface); 3300} 3301 3302> box > title:active > expander { 3303transition-duration: $ripple-active-transition-duration; 3304animation: ripple $ripple-fade-in-duration $ease-out forwards; 3305background-size: 0% 0%; 3306background-image: radial-gradient(circle, overlay("pressed", $on-surface) 10%, transparent 10%); 3307} 3308} 3309 3310/** 3311* Calendar 3312*/ 3313 3314calendar { 3315// border: 1px solid divider($on-surface); 3316border-radius: $corner-radius; 3317box-shadow: $shadow-z1; 3318background-color: $surface-z1; 3319color: $on-surface; 3320 3321&:disabled { 3322color: disabled($on-surface); 3323} 3324 3325> header { 3326padding: 4px; 3327border-spacing: 4px; 3328border-bottom: 1px solid divider($on-surface); 3329 3330> button.image-button { 3331padding: 0; 3332min-width: 28px; 3333min-height: 28px; 3334border-radius: $circular-radius; 3335background-color: transparent; 3336color: hint($on-surface); 3337@include ink-color($on-surface, $button-style: "flat"); 3338 3339&:disabled { 3340color: disabled-hint($on-surface); 3341} 3342} 3343} 3344 3345> grid { 3346padding: 4px; 3347border-spacing: 4px; 3348 3349> label { 3350// padding: 4px; 3351padding: 0; 3352min-width: 28px; 3353min-height: 28px; 3354border-radius: $circular-radius; 3355} 3356 3357> label.day-name, 3358> label.week-number { 3359color: hint($on-surface); 3360font-weight: 500; 3361} 3362 3363> label.day-number { 3364@extend %ripple; 3365@include ink-color($on-surface); 3366 3367&.today { 3368box-shadow: inset 0 0 0 1px hint($on-surface); 3369} 3370 3371&.other-month { 3372color: disabled-hint($on-surface); 3373} 3374 3375&:selected { 3376background-color: $overlay-selected; 3377box-shadow: inset 0 0 0 1px transparent; 3378@include ink-color($primary, $on: $overlay-selected); 3379} 3380} 3381} 3382} 3383 3384/** 3385* Dialogs 3386*/ 3387 3388window.dialog.message { // Message Dialog styling 3389&.csd.background { 3390min-width: 280px; 3391border-radius: $corner-radius; // rounded bottom border styling for csd version 3392background-color: $surface-z8; 3393} 3394 3395> .titlebar { 3396min-height: 24px; 3397box-shadow: inset 0 1px highlight($surface-z8); 3398background-color: transparent; 3399color: $on-surface; 3400 3401&:backdrop { 3402background-color: transparent; 3403color: hint($on-surface); 3404} 3405} 3406 3407> box.dialog-vbox.vertical { 3408border-spacing: 20px; 3409 3410> box.vertical > box.horizontal { 3411margin: 0 24px - 30px; 3412} 3413} 3414 3415label.title { 3416font-weight: 500; 3417font-size: pt(20px); 3418letter-spacing: pt(.15px); 3419} 3420 3421// Hint text 3422label.title + label { 3423color: hint($on-surface); 3424} 3425 3426list, 3427.view { 3428background-color: transparent; 3429} 3430 3431.dialog-action-area > button { 3432@extend %button-flat; 3433 3434&:not(:disabled) { 3435color: $primary; 3436@include ink-color($primary); 3437} 3438 3439&.suggested-action:not(:disabled) { 3440background-color: transparent; 3441// color: $primary; 3442// @include ink-color($primary); 3443} 3444 3445&.destructive-action:not(:disabled) { 3446background-color: transparent; 3447color: $error; 3448@include ink-color($error); 3449} 3450} 3451} 3452 3453.dialog-action-area { 3454// margin-top: -$container-padding; 3455padding: $container-padding; 3456border-spacing: $container-padding; 3457} 3458 3459filechooser { 3460.dialog-action-box { 3461border-top: 1px solid divider($on-surface); 3462} 3463 3464#pathbarbox { 3465border-bottom: 1px solid divider($on-surface); 3466// background-color: $surface-z0; 3467 3468> stack > box > button { // The new folder button 3469@extend %button-flat; 3470 3471border-radius: $circular-radius; 3472} 3473} 3474} 3475 3476filechooserbutton > button > box { 3477border-spacing: 6px; 3478} 3479 3480filechooserbutton:drop(active) { 3481// box-shadow: none; 3482} 3483 3484/** 3485* Sidebar 3486*/ 3487 3488.sidebar { 3489border-style: none; 3490 3491&:not(separator) { 3492@at-root %sidebar_left, 3493&:dir(ltr), 3494&.left, 3495&.left:dir(rtl) { 3496border-right: 1px solid divider($on-surface); 3497border-left-style: none; 3498} 3499 3500@at-root %sidebar_right, 3501&:dir(rtl), 3502&.right { 3503border-left: 1px solid divider($on-surface); 3504border-right-style: none; 3505} 3506} 3507 3508list { 3509// background-color: transparent; 3510} 3511 3512paned & { 3513&:dir(rtl):not(:dir(ltr)), 3514&:dir(ltr):not(:dir(rtl)) { 3515border-style: none; 3516} 3517} 3518} 3519 3520stacksidebar.sidebar { 3521list { 3522padding: 4px; 3523} 3524 3525list.separators:not(.horizontal) > row:not(:first-child) { 3526border-top-style: none; 3527} 3528 3529row { 3530min-height: 32px; 3531padding: 0 8px - 6px; 3532border-radius: $corner-radius; 3533color: hint($on-surface); 3534font-weight: 500; 3535 3536&:selected { 3537background-color: overlay("activated", $primary); 3538color: $primary; 3539@include ink-color($primary, $on: overlay("activated", $primary)); 3540} 3541 3542+ row { 3543margin-top: 4px; 3544} 3545 3546> label { 3547padding-left: 6px; 3548padding-right: 6px; 3549} 3550 3551&.needs-attention > label { 3552@extend %needs-attention; 3553} 3554} 3555} 3556 3557separator.sidebar { 3558&.selection-mode, 3559.selection-mode & { 3560// background-color: divider($on-surface); 3561} 3562} 3563 3564/** 3565* File chooser 3566*/ 3567 3568// dim the sidebar icons, see bug #786613 for details on this oddity 3569row image.sidebar-icon { 3570transition: color $duration $ease-out; 3571color: hint($on-surface); 3572 3573&:disabled { 3574color: disabled-hint($on-surface); 3575} 3576} 3577 3578placessidebar.sidebar { 3579list { 3580padding: 4px 0; 3581 3582> separator { 3583margin: 4px 0; 3584} 3585} 3586 3587row { 3588// Needs overriding of the GtkListBoxRow padding 3589min-height: 32px; 3590margin: 0 4px; // Remove unwanted hard-coded vertical margins with -1px 3591padding: 0; 3592border-radius: $corner-radius; 3593color: hint($on-surface); 3594font-weight: 500; 3595 3596// Using margins/padding directly in the SidebarRow 3597// will make the animation of the new bookmark row jump 3598> revealer { 3599padding: 0 8px; 3600} 3601 3602&:selected { 3603background-color: overlay("activated", $primary); 3604color: $primary; 3605@include ink-color($primary, $on: overlay("activated", $primary)); 3606 3607image.sidebar-icon { 3608color: $primary; 3609} 3610} 3611 3612&:disabled { 3613color: disabled($on-surface); 3614} 3615 3616image.sidebar-icon { 3617&:dir(ltr) { 3618padding-right: 8px; 3619} 3620 3621&:dir(rtl) { 3622padding-left: 8px; 3623} 3624} 3625 3626label.sidebar-label { 3627&:dir(ltr) { 3628padding-right: 2px; 3629} 3630 3631&:dir(rtl) { 3632padding-left: 2px; 3633} 3634} 3635 3636@at-root button.sidebar-button { 3637@extend %button-flat-basic; 3638@extend %button-small; 3639} 3640 3641&.sidebar-placeholder-row { 3642background-color: overlay("hover", $on-surface); 3643} 3644 3645&.sidebar-new-bookmark-row { 3646color: $primary; 3647 3648image.sidebar-icon { 3649color: $primary; 3650} 3651} 3652} 3653} 3654 3655placesview { 3656.server-list-button { 3657> image { 3658-gtk-icon-transform: rotate(0turn); 3659} 3660 3661&:checked > image { 3662-gtk-icon-transform: rotate(-0.5turn); 3663} 3664} 3665 3666> actionbar > revealer > box > box { 3667border-spacing: $container-padding; 3668} 3669 3670// this selects the "connect to server" label 3671> actionbar > revealer > box > box > label { 3672padding-left: 8px; 3673padding-right: 8px; 3674} 3675} 3676 3677/** 3678* Paned 3679*/ 3680 3681paned { 3682> separator { 3683background-clip: content-box; 3684// -gtk-icon-source: none; // defeats the ugly default handle decoration 3685 3686&.wide { 3687min-width: 4px; 3688min-height: 4px; 3689border: 1px solid divider($on-surface); 3690background-color: transparent; 3691} 3692} 3693 3694&.horizontal > separator { 3695&:not(.wide) { 3696margin: 0 -4px; 3697padding: 0 4px; 3698} 3699 3700&.wide { 3701border-style: none solid; 3702} 3703} 3704 3705&.vertical > separator { 3706&:not(.wide) { 3707margin: -4px 0; 3708padding: 4px 0; 3709} 3710 3711&.wide { 3712border-style: solid none; 3713} 3714} 3715} 3716 3717/** 3718* GtkVideo 3719*/ 3720 3721video { 3722background-color: black; 3723 3724image.osd { 3725min-width: 64px; 3726min-height: 64px; 3727border-radius: 32px; 3728background-color: $scrim; 3729color: $on-scrim; 3730} 3731 3732controls.osd { 3733padding: 4px; 3734background-image: 3735linear-gradient( 3736to bottom, 3737transparent, 3738rgba(black, .1) 30%, 3739rgba(black, .2) 50%, 3740rgba(black, .4) 3741); 3742color: on(black); 3743 3744button { 3745background-color: transparent; 3746color: hint(on(black)); 3747@include ink-color(on(black)); 3748} 3749} 3750} 3751 3752/** 3753* GtkInfoBar 3754*/ 3755 3756infobar { 3757> revealer > box { 3758padding: 8px; 3759border-spacing: 12px; 3760} 3761 3762&.action:hover > revealer > box { 3763background-image: image(overlay("hover", $on-surface)); 3764} 3765 3766&.info > revealer > box, 3767&.question > revealer > box { 3768border-bottom: 1px solid divider($on-surface); 3769// background-color: $surface-z1; 3770 3771button { 3772@extend %button-flat; 3773 3774&.text-button:not(:disabled) { 3775color: $primary; 3776@include ink-color($primary); 3777} 3778} 3779} 3780 3781&.warning > revealer > box { 3782background-color: $warning; 3783color: $on-warning; 3784 3785button.flat { 3786color: $on-warning; 3787@include ink-color($on-warning); 3788} 3789 3790selection { 3791} 3792 3793link { 3794color: $on-warning; 3795} 3796} 3797 3798&.error > revealer > box { 3799background-color: $error; 3800color: $on-error; 3801 3802button.flat { 3803color: $on-error; 3804@include ink-color($on-error); 3805} 3806 3807selection { 3808} 3809 3810link { 3811color: $on-error; 3812} 3813} 3814 3815// Remove ugly hard-coded padding 3816button label { 3817// margin: 0 -4px; 3818} 3819} 3820 3821/** 3822* Tooltips 3823*/ 3824 3825tooltip { 3826&.background { 3827// background-color needs to be set this way otherwise it gets drawn twice 3828// see https://bugzilla.gnome.org/show_bug.cgi?id=736155 for details. 3829background-color: $tooltip; 3830color: $on-tooltip; 3831} 3832 3833min-height: 32px - 4px * 2; 3834padding: 4px 8px; 3835border-radius: $corner-radius; 3836 3837&:not(.csd) { 3838background-color: $tooltip; 3839} 3840 3841> box { 3842border-spacing: 6px; 3843} 3844 3845.dim-label { 3846color: hint($on-tooltip); 3847} 3848} 3849 3850/** 3851* Color Chooser 3852*/ 3853 3854colorswatch { 3855// This widget is made of two boxes one on top of the other, the lower box is colorswatch {} the other one 3856// is colorswatch overlay {}, colorswatch has the programmatically set background, so most of the style is 3857// applied to the overlay box. 3858 3859// base color corners rounding 3860// to avoid the artifacts caused by rounded corner anti-aliasing the base color 3861// sports a bigger radius. 3862// nth-child is needed by the custom color strip. 3863 3864transition: $transition-shadow; 3865box-shadow: $shadow-z1; 3866 3867&:drop(active), 3868&.activatable:hover { 3869box-shadow: $shadow-z3; 3870} 3871 3872&:disabled { 3873opacity: .5; 3874// box-shadow: none; 3875} 3876 3877&.top { 3878border-top-left-radius: $corner-radius; 3879border-top-right-radius: $corner-radius; 3880} 3881 3882&.bottom { 3883border-bottom-left-radius: $corner-radius; 3884border-bottom-right-radius: $corner-radius; 3885} 3886 3887&.left, 3888&:first-child:not(.top) { 3889border-top-left-radius: $corner-radius; 3890border-bottom-left-radius: $corner-radius; 3891} 3892 3893&.right, 3894&:last-child:not(.bottom) { 3895border-top-right-radius: $corner-radius; 3896border-bottom-right-radius: $corner-radius; 3897} 3898 3899&.dark { 3900color: $on-dark; 3901} 3902 3903&.light { 3904color: $on-light; 3905} 3906 3907&#add-color-button { 3908// border-radius: $corner-radius 0 0 $corner-radius; 3909background-color: $surface-z8; 3910color: $on-surface; 3911 3912&:only-child { 3913// border-radius: $corner-radius; 3914} 3915} 3916 3917row:selected & { 3918} 3919 3920&#editor-color-sample { 3921border-radius: $corner-radius; 3922} 3923} 3924 3925// colorscale popup 3926colorchooser .popover.osd { 3927transition: $transition-shadow; 3928border-radius: $corner-radius; 3929box-shadow: $shadow-z4, inset 0 1px highlight($surface-z8); 3930background-color: $surface-z8; 3931 3932&:backdrop { 3933box-shadow: $shadow-z2, inset 0 1px highlight($surface-z8); 3934} 3935} 3936 3937/** 3938* Misc 3939*/ 3940 3941// content view (grid/list) 3942.content-view { 3943// background-color: $surface-z0; 3944 3945&:hover { 3946// -gtk-icon-filter: brightness(1.2); 3947} 3948} 3949 3950.scale-popup { 3951.osd & { 3952// @extend %osd; 3953 3954button.flat { 3955} 3956} 3957 3958// +/- buttons on GtkVolumeButton popup 3959button { 3960} 3961} 3962 3963/** 3964* Window Decorations 3965*/ 3966 3967window { 3968&.csd { 3969transition: $transition-shadow; 3970border-radius: $corner-radius $corner-radius 0 0; 3971border-radius: $corner-radius; 3972box-shadow: $shadow-z16, 0 16px 24px 2px transparent, 0 6px 30px 5px transparent; 3973 3974&:backdrop { 3975// the transparent shadow here is to enforce that the shadow extents don't 3976// change when we go to backdrop, to prevent jumping windows. 3977// The biggest shadow should be in the same order then in the active state 3978// or the jumping will happen during the transition. 3979box-shadow: $shadow-z4, 0 16px 24px 2px transparent, 0 6px 30px 5px transparent; 3980} 3981} 3982 3983// server-side decorations as used by mutter 3984&.ssd { 3985box-shadow: 0 3px 3px rgba(0, 0, 0, 0.16); // just doing borders, wm draws actual shadows 3986} 3987 3988&.solid-csd { 3989margin: 0; 3990padding: 2px; 3991border-radius: 0; 3992box-shadow: none; 3993box-shadow: inset 0 1px highlight($titlebar); 3994background-color: $titlebar; 3995 3996&:backdrop { 3997background-color: $titlebar-backdrop; 3998} 3999} 4000 4001&.maximized, 4002&.fullscreen, 4003&.tiled, 4004&.tiled-top, 4005&.tiled-left, 4006&.tiled-right, 4007&.tiled-bottom { 4008border-radius: 0; 4009} 4010} 4011 4012// catch all extend :) 4013 4014%selected_items { 4015background-color: $overlay-selected; 4016} 4017 4018.monospace { 4019font-family: monospace; 4020} 4021 4022/** 4023* Touch Copy & Paste 4024*/ 4025 4026// touch selection handlebars for the Popover.osd above 4027cursor-handle { 4028min-width: 24px; 4029min-height: 24px; 4030border-radius: 50%; 4031background-color: $primary; 4032// -gtk-icon-source: -gtk-recolor(url("icons/cursor-handle-symbolic.svg")); 4033 4034&.top:dir(ltr), 4035&.bottom:dir(rtl) { 4036border-top-right-radius: 0; 4037// -gtk-icon-transform: rotate(90deg); 4038} 4039 4040&.bottom:dir(ltr), 4041&.top:dir(rtl) { 4042border-top-left-radius: 0; 4043// -gtk-icon-transform: unset; 4044} 4045 4046&.insertion-cursor:dir(ltr), 4047&.insertion-cursor:dir(rtl) { 4048margin-top: 6px; 4049transform: rotate(45deg); 4050} 4051} 4052 4053shortcuts-section { 4054margin: 20px; 4055} 4056 4057.shortcuts-search-results { 4058margin: 20px; 4059border-spacing: 24px; 4060} 4061 4062// shortcut window keys 4063shortcut { 4064border-spacing: 6px; 4065} 4066 4067shortcut > .keycap { 4068min-width: 28px - 8px * 2; 4069// min-height: 28px - 2px; 4070min-height: 28px; 4071// margin-top: 2px; 4072// padding-bottom: 2px; 4073padding-left: 8px; 4074padding-right: 8px; 4075 4076// border: solid 1px divider($on-surface); 4077// border-radius: $corner-radius + 1px; 4078border-radius: $corner-radius; 4079// box-shadow: inset 0 -2px divider($on-surface); 4080box-shadow: $shadow-z1; 4081background-color: $surface-z8; 4082color: $on-surface; 4083font-size: smaller; 4084} 4085 4086// FIXME needs to be done widget by widget, this wildcard should really die 4087:drop(active) { 4088// caret-color: $primary; 4089} 4090 4091// FIXME aggregate with buttons 4092stackswitcher > button.text-button { 4093min-width: 100px; 4094} 4095 4096stackswitcher.circular { 4097border-spacing: 12px; 4098 4099// FIXME aggregate with buttons 4100> button.circular { 4101min-width: $medium-size; 4102min-height: $medium-size; 4103padding: 0; 4104} 4105} 4106 4107/** 4108* App Icons 4109*/ 4110 4111// Outline for low res icons 4112.lowres-icon { 4113// -gtk-icon-shadow: none; 4114} 4115 4116// Drapshadow for large icons 4117.icon-dropshadow { 4118// -gtk-icon-shadow: none; 4119} 4120 4121/** 4122* Emoji 4123*/ 4124 4125popover.emoji-picker > contents { 4126padding: 0; 4127 4128emoji { 4129min-width: 3em; 4130min-height: 3em; 4131// padding: 8px; 4132border-radius: $corner-radius; 4133// font-size: larger; 4134 4135@extend %ripple; 4136@include ink-color($on-surface); 4137} 4138} 4139 4140.emoji-searchbar { 4141border-bottom: 1px solid divider($on-surface); 4142 4143> entry.search { 4144border-image: none; 4145border-radius: 0; 4146box-shadow: none; 4147background-color: transparent; 4148} 4149} 4150 4151.emoji-toolbar { 4152padding: 4px; 4153border-spacing: 4px; 4154border-top: 1px solid divider($on-surface); 4155 4156> button.emoji-section { 4157&:checked { 4158background-color: overlay("activated", $primary); 4159color: $primary; 4160@include ink-color($primary, $on: overlay("activated", $primary)); 4161} 4162} 4163} 4164 4165popover.emoji-completion > contents { 4166padding: 8px 0; 4167 4168emoji-completion-row { 4169min-height: 32px; 4170padding: 0 8px; 4171@extend %ripple; 4172@include ink-color($on-surface); 4173 4174> box { 4175border-spacing: 8px; 4176} 4177} 4178 4179emoji { 4180// min-width: 3em; 4181// min-height: 3em; 4182// padding: 8px; 4183border-radius: $corner-radius; 4184 4185@extend %ripple; 4186@include ink-color($on-surface); 4187} 4188} 4189 4190popover.entry-completion > contents { 4191padding: 0; 4192 4193treeview.view { 4194min-height: 32px; // FIXME: should be in .cell 4195padding: 8px 0; 4196 4197> .cell { 4198padding: 0 4px; // FIXME: should be `0 8px` 4199 4200&:selected:hover { 4201background-color: overlay("focus", $on-surface); 4202} 4203} 4204} 4205} 4206