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