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