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