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