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