1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804
|
Title: Style Classes
Slug: style-classes
# Style Classes
The Adwaita stylesheet provides a number of style classes. They can be applied
to widgets to change their appearance.
# Buttons
The following style classes can be applied to [class@Gtk.Button] to change its
appearance.
## Suggested Action
<picture>
<source srcset="buttons-suggested-action-dark.png" media="(prefers-color-scheme: dark)">
<img src="buttons-suggested-action.png" alt="buttons-suggested-action">
</picture>
<picture>
<source srcset="button-row-suggested-action-dark.png" media="(prefers-color-scheme: dark)">
<img src="button-row-suggested-action.png" alt="button-row-suggested-action">
</picture>
The `.suggested-action` style class makes the button use accent colors. It can
be used to denote important buttons, for example, the affirmative button in an
action dialog.
It can be used in combination with [`.circular`](#circular) or [`.pill`](#pill).
Can also be used with [class@Gtk.MenuButton], [class@SplitButton] or
[class@ButtonRow].
## Destructive Action
<picture>
<source srcset="buttons-destructive-action-dark.png" media="(prefers-color-scheme: dark)">
<img src="buttons-destructive-action.png" alt="buttons-destructive-action">
</picture>
<picture>
<source srcset="button-row-destructive-action-dark.png" media="(prefers-color-scheme: dark)">
<img src="button-row-destructive-action.png" alt="button-row-destructive-action">
</picture>
The `.destructive-action` style class makes the button use destructive colors.
It can be used to draw attention to the potentially damaging consequences of
using a button. This style acts as a warning to the user.
It can be used in combination with [`.flat`](#flat), [`.circular`](#circular),
or [`.pill`](#pill).
Can also be used with [class@Gtk.MenuButton], [class@SplitButton] or
[class@ButtonRow].
## Flat
<picture>
<source srcset="buttons-flat-dark.png" media="(prefers-color-scheme: dark)">
<img src="buttons-flat.png" alt="buttons-flat">
</picture>
The `.flat` style class makes the button use flat appearance, looking like a
label or an icon until hovered.
Button inside [toolbars and similar widgets](#toolbars) appear flat by default.
It can be used in combination with [`.circular`](#circular) or [`.pill`](#pill).
Can also be used with [class@Gtk.MenuButton] or [class@SplitButton].
Can be set via [property@Gtk.Button:has-frame] and
[property@Gtk.MenuButton:has-frame].
## Raised
<picture>
<source srcset="buttons-raised-dark.png" media="(prefers-color-scheme: dark)">
<img src="buttons-raised.png" alt="buttons-raised">
</picture>
The `.raised` style class makes the button use the regular appearance instead of
the flat one.
This style class is only useful inside [toolbars and similar widgets](#toolbars).
It can be used in combination with [`.circular`](#circular) or [`.pill`](#pill).
Can also be used with [class@Gtk.MenuButton] or [class@SplitButton].
## Circular
<picture>
<source srcset="buttons-circular-dark.png" media="(prefers-color-scheme: dark)">
<img src="buttons-circular.png" alt="buttons-circular">
</picture>
The `.circular` style class makes the button round. It can be used with buttons
containing icons or short labels (1-2 characters).
It can be used in combination with [`.suggested-action`](#suggested-action),
[`.destructive-action`](#destructive-action), [`.flat`](#flat),
[`.raised`](#raised), [`.opaque`](#opaque) or [`.osd`](#overlay-buttons).
Can also be used with [class@Gtk.MenuButton].
## Pill
<picture>
<source srcset="buttons-pill-dark.png" media="(prefers-color-scheme: dark)">
<img src="buttons-pill.png" alt="buttons-pill">
</picture>
The `.pill` style class makes the button appear as a pill. It's often used for
important standalone buttons, for example, inside a [class@StatusPage].
It can be used in combination with [`.suggested-action`](#suggested-action),
[`.destructive-action`](#destructive-action), [`.flat`](#flat),
[`.raised`](#raised), [`.opaque`](#opaque) or [`.osd`](#overlay-buttons).
# Toggle Groups
The following style classes can be applied to [class@ToggleGroup] or
[class@InlineViewSwitcher] to change its appearance.
## Flat
<picture>
<source srcset="toggle-group-flat-dark.png" media="(prefers-color-scheme: dark)">
<img src="toggle-group-flat.png" alt="toggle-group-flat">
</picture>
The `.flat` style class makes the group look like a series of flat buttons.
It can be used in combination with [`.round`](#round).
## Round
<picture>
<source srcset="toggle-group-round-dark.png" media="(prefers-color-scheme: dark)">
<img src="toggle-group-round.png" alt="toggle-group-round">
</picture>
The `.round` style class makes the group, as well as toggles inside it rounded.
It can be used in combination with [`.flat`](#flat_1).
# Linked Controls
<picture>
<source srcset="linked-controls-dark.png" media="(prefers-color-scheme: dark)">
<img src="linked-controls.png" alt="linked-controls">
</picture>
The `.linked` style class can be applied to a [class@Gtk.Box] to make its
children appear as a single group. The box must have no spacing.
Linked boxes can be both horizontal and vertical.
The following widgets can be linked:
* [class@Gtk.Button]
* [class@Gtk.MenuButton]
* [class@Gtk.DropDown]
* [class@Gtk.ColorDialogButton]
* [class@Gtk.FontDialogButton]
* [class@TabButton]
* [class@Gtk.Entry]
* [class@Gtk.PasswordEntry]
* [class@Gtk.SearchEntry]
* [class@Gtk.SpinButton]
Linked styles will not work correctly for buttons with the following style
classes:
* [`.flat`](#flat)
* [`.suggested-action`](#suggested-action)
* [`.opaque`](#opaque)
If a linked box is contained within a [toolbar or a similar widget](#toolbars),
buttons inside it won't get the flat appearance.
# Toolbars
<picture>
<source srcset="toolbar-dark.png" media="(prefers-color-scheme: dark)">
<img src="toolbar.png" alt="toolbar">
</picture>
The `.toolbar` style class can be applied to a horizontal [class@Gtk.Box]. The
same appearance is also used by [class@HeaderBar], [class@Gtk.HeaderBar],
[class@Gtk.ActionBar] and [class@Gtk.SearchBar] automatically.
It changes the appearance of buttons inside it to make them flat when possible,
according to the following rules:
The following buttons get flat appearance:
<picture>
<source srcset="toolbar-flat-dark.png" media="(prefers-color-scheme: dark)">
<img src="toolbar-flat.png" alt="toolbar-flat">
</picture>
* Icon-only buttons;
* Buttons with an icon and a label (using [class@ButtonContent]);
* Menu buttons containing an arrow;
* [class@SplitButton];
* Any other button with the [`.flat`](#flat) style class.
The following buttons keep default appearance:
<picture>
<source srcset="toolbar-raised-dark.png" media="(prefers-color-scheme: dark)">
<img src="toolbar-raised.png" alt="toolbar-raised">
</picture>
* Text-only buttons;
* Buttons with other content;
* Buttons within widgets with the [`.linked`](#linked-controls) style
class;
* Buttons with the [`.suggested-action`](style-classes.html#suggested-action) or
[`.opaque`](style-classes.html#opaque) style classes;
* Buttons with the [`.destructive-action`](style-classes.html#destructive-action)
style class;
* Buttons with the [`.raised`](#raised) style class.
It also ensures 6px margins and spacing between widgets. The
[`.spacer`](#spacers) style class can be useful to separate groups of widgets.
::: important
The [property@Gtk.Button:has-frame] property will **not** be set to `FALSE`
when a button gets the flat appearance automatically. It also cannot be set
to `TRUE` to make a button raised, the style class should be used directly
instead.
# Spacers
<picture>
<source srcset="toolbar-spacer-dark.png" media="(prefers-color-scheme: dark)">
<img src="toolbar-spacer.png" alt="toolbar-spacer">
</picture>
The `.spacer` style class can be applied to a [class@Gtk.Separator] to make it
appear invisible and act as whitespace. This can be useful with [toolbars and
similar widgets](#toolbars) to separate groups of widgets from each other.
# Dimmed
<picture>
<source srcset="dimmed-dark.png" media="(prefers-color-scheme: dark)">
<img src="dimmed.png" alt="dimmed">
</picture>
The `.dimmed` style class make the widget it's applied to partially transparent.
The opacity changes between regular and high contrast styles and is represented
by the [`--dim-opacity`](css-variables.html#opacity) variable. Use that variable
if the style class cannot be used directly.
Since: 1.7
# Typography
These style classes can be applied to any widgets, but are mostly used for
[class@Gtk.Label] or other widgets that contain them.
## Titles
<picture>
<source srcset="typography-titles-dark.png" media="(prefers-color-scheme: dark)">
<img src="typography-titles.png" alt="typography-titles">
</picture>
The `.title-1`, `.title-2`, `.title-3`, `.title-4` classes provide four levels
of title styles, indicating hierarchy. The specific use heavily depends on
context. Generally, the larger styles are intended to be used in bigger views
with plenty of whitespace around them.
## Heading
<picture>
<source srcset="typography-heading-dark.png" media="(prefers-color-scheme: dark)">
<img src="typography-heading.png" alt="typography-heading">
</picture>
The `.heading` style class is the standard style for UI headings using the
default text size, such as window titles or boxed list labels.
## Document
<picture>
<source srcset="typography-document-dark.png" media="(prefers-color-scheme: dark)">
<img src="typography-document.png" alt="typography-document">
</picture>
The `.document` style class makes the widget use the
[document font](css-variables.html#document-font). This increases the font size
and line height to help make large amounts of text more readable. It should be
used for the app's main content, such as messages in a chat app. For other long
text, use `.body` instead.
Since: 1.8
## Body
<picture>
<source srcset="typography-body-dark.png" media="(prefers-color-scheme: dark)">
<img src="typography-body.png" alt="typography-body">
</picture>
The `.body` style class increases line height to make text more readable. It
should be used for text within the UI, such as descriptions or dialog body, to
make it more legible. For the main content, use `.document` instead.
Avoid using `.body` for non-wrapping text.
## Captions
<picture>
<source srcset="typography-captions-dark.png" media="(prefers-color-scheme: dark)">
<img src="typography-captions.png" alt="typography-captions">
</picture>
The `.caption-heading` and `.caption` style classes make text smaller. They
are intended to be used to differentiate sub-text which accompanies text in
the regular body style.
## Monospace
<picture>
<source srcset="typography-monospace-dark.png" media="(prefers-color-scheme: dark)">
<img src="typography-monospace.png" alt="typography-monospace">
</picture>
The `.monospace` style class makes the widget use the
[monospace font](css-variables.html#monospace-font). This can be useful when
displaying code, logs or shell commands.
For [class@EntryRow], it only makes the editable part monospace, but not title
or any extra widgets. To make everything in the row monospace, apply
`.monospace` to the [class@Gtk.ListBox] around the row.
## Numeric
<picture>
<source srcset="typography-numeric-dark.png" media="(prefers-color-scheme: dark)">
<img src="typography-numeric.png" alt="typography-numeric">
</picture>
The `.numeric` style class makes the widget use tabular figures. This is
equivalent to using [struct@Pango.AttrFontFeatures] with `"tnum=1"` features.
This style is useful in situations where multiple labels are vertically aligned,
or when displaying time, an operation progress or another number that can
quickly change.
# Colors
<picture>
<source srcset="style-colors-dark.png" media="(prefers-color-scheme: dark)">
<img src="style-colors.png" alt="style-colors">
</picture>
The following style classes change widget colors:
Class | Color
----------------- | -------------------------------------------
<tt>.accent</tt> | [accent color](css-variables.html#accent-colors)
<tt>.success</tt> | [success color](css-variables.html#success-colors)
<tt>.warning</tt> | [warning color](css-variables.html#warning-colors)
<tt>.error</tt> | [error color](css-variables.html#error-colors)
They can be applied to any widget.
The `.error`, `.warning`, `.success` style classes also change the widget's
accent color to the respective color. They can also be applied to
[class@Gtk.Entry]. In that case, they can be used to indicate input validation
state.
# Boxed Lists & Cards
<picture>
<source srcset="boxed-lists-dark.png" media="(prefers-color-scheme: dark)">
<img src="boxed-lists.png" alt="boxed-lists">
</picture>
The `.boxed-list` style class can be applied to a [class@Gtk.ListBox] to make it
a [boxed list](boxed-lists.html). The list box should have
[property@Gtk.ListBox:selection-mode] set to `GTK_SELECTION_NONE`.
<picture>
<source srcset="boxed-lists-separate-dark.png" media="(prefers-color-scheme: dark)">
<img src="boxed-lists-separate.png" alt="boxed-lists-separate">
</picture>
The `.boxed-list-separate` style class is similar to `.boxed-list`, but presents
each row as a separate card instead of the whole list being a single card with
separators. The list box should have [property@Gtk.ListBox:selection-mode] set
to `GTK_SELECTION_NONE`.
<picture>
<source srcset="cards-dark.png" media="(prefers-color-scheme: dark)">
<img src="cards.png" alt="cards">
</picture>
The `.card` style class can be applied to any other widget to give it a similar
appearance.
If a widget with the `.card` style class also has the `.activatable` style
class, it will also have hover and active states similar to an activatable row
inside a boxed list.
If the `.card` style class is applied to a [class@Gtk.Button], it will get these
states automatically, without needing the `.activatable` class.
# Sidebars
<picture>
<source srcset="navigation-sidebar-dark.png" media="(prefers-color-scheme: dark)">
<img src="navigation-sidebar.png" alt="navigation-sidebar">
</picture>
The `.navigation-sidebar` style class can be applied to a [class@Gtk.ListBox]
or [class@Gtk.ListView], as well as [class@Gtk.FlowBox] and
[class@Gtk.GridView], to make it look like a sidebar: it makes the items rounded
and padded, makes selected items use neutral color instead of accent, and
removes the default list background.
# App Icons
<picture>
<source srcset="app-icons-dark.png" media="(prefers-color-scheme: dark)">
<img src="app-icons.png" alt="app-icons">
</picture>
GNOME application icons require a shadow to be legible on a light background.
The `.icon-dropshadow` and `.lowres-icon` style classes provide it when used
with [class@Gtk.Image] or any other widget that contains an image.
`.lowres-icon` should be used for 32×32 or smaller icons, and `.icon-dropshadow`
should be used otherwise.
# Selection Mode Check Buttons
<picture>
<source srcset="selection-mode-checks-dark.png" media="(prefers-color-scheme: dark)">
<img src="selection-mode-checks.png" alt="selection-mode-checks">
</picture>
The `.selection-mode` style class can be added to a [class@Gtk.CheckButton] to
give it a larger and round appearance. These check buttons are intended to be
used for selecting items from a list or a grid.
# OSD
<picture>
<source srcset="osd-dark.png" media="(prefers-color-scheme: dark)">
<img src="osd.png" alt="osd">
</picture>
The `.osd` style class has a number of loosely related purposes depending on
what widget it's applied to.
Usually, it makes the widget background dark and partially transparent, and
makes its accent color white.
However, it has different effects in a few specific cases.
## Overlay Buttons
<picture>
<source srcset="osd-buttons-dark.png" media="(prefers-color-scheme: dark)">
<img src="osd-buttons.png" alt="osd-buttons">
</picture>
When used with [class@Gtk.Button], `.osd` can be used to create large standalone
buttons that overlap content, for example, the previous/next page arrows in an
image viewer. They appear dark and slightly larger than regular buttons.
It can be used in combination with [`.circular`](#circular) or [`.pill`](#pill).
## Floating Toolbars
<picture>
<source srcset="osd-toolbar-dark.png" media="(prefers-color-scheme: dark)">
<img src="osd-toolbar.png" alt="osd-toolbar">
</picture>
When used along with the [`.toolbar`](#toolbars) style class, `.osd` gives the
box additional padding and round corners. This can be used to create floating
toolbars, such as video player controls.
## Progress Bars
<picture>
<source srcset="osd-progress-bar-dark.png" media="(prefers-color-scheme: dark)">
<img src="osd-progress-bar.png" alt="osd-progress-bar">
</picture>
When used with [class@Gtk.ProgressBar], `.osd` makes the progress bar thinner
and removes its visible trough.
OSD progress bars are intended to be used as [class@Gtk.Overlay] children,
attached to the top of the window.
# Background
<picture>
<source srcset="style-background-dark.png" media="(prefers-color-scheme: dark)">
<img src="style-background.png" alt="style-background">
</picture>
The `.background` style class can be used with any widget to give it the default
[window](css-variables.html#window-colors) background and foreground colors.
This can be useful when a widget needs an opaque background.
It's equivalent to using the following CSS:
```css
.background {
background-color: var(--window-bg-color);
color: var(--window-fg-color);
}
```
# View
<picture>
<source srcset="style-view-dark.png" media="(prefers-color-scheme: dark)">
<img src="style-view.png" alt="style-view">
</picture>
The `.view` style class can be used with any widget to give it the default
[view](css-variables.html#window-colors) background and foreground colors.
It's equivalent to using the following CSS:
```css
.view {
background-color: var(--view-bg-color);
color: var(--view-fg-color);
}
```
# Frame
<picture>
<source srcset="style-frame-dark.png" media="(prefers-color-scheme: dark)">
<img src="style-frame.png" alt="style-frame">
</picture>
The `.frame` style class can be used with any widget to give it the default
border.
It's equivalent to using the following CSS:
```css
.frame {
border: 1px solid var(--border-color);
}
```
# Compact Status Page
<picture>
<source srcset="status-page-compact-dark.png" media="(prefers-color-scheme: dark)">
<img src="status-page-compact.png" alt="status-page-compact">
</picture>
The `.compact` style class can be used with a [class@StatusPage] to make it take
less space. This is usually used with sidebars or popovers.
# Menu Popovers
<picture>
<source srcset="popover-menu-list-dark.png" media="(prefers-color-scheme: dark)">
<img src="popover-menu-list.png" alt="popover-menu-list">
</picture>
The `.menu` style class can be used with a [class@Gtk.Popover] to give it a
menu-like appearance if it has a [class@Gtk.ListBox] or a [class@Gtk.ListView]
inside it.
# Development Window
<picture>
<source srcset="devel-window-dark.png" media="(prefers-color-scheme: dark)">
<img src="devel-window.png" alt="devel-window">
</picture>
The `.devel` style class can be used with [class@Gtk.Window]. This will give
any [class@HeaderBar] or [class@Gtk.HeaderBar] inside that window a striped
appearance.
This style class is typically used to indicate unstable or nightly applications.
# Inline
<picture>
<source srcset="search-bar-inline-dark.png" media="(prefers-color-scheme: dark)">
<img src="search-bar-inline.png" alt="search-bar-inline">
</picture>
<picture>
<source srcset="tab-bar-inline-dark.png" media="(prefers-color-scheme: dark)">
<img src="tab-bar-inline.png" alt="tab-bar-inline">
</picture>
The `.inline` style class can be used with [class@Gtk.SearchBar], [class@TabBar]
or [class@Gtk.TextView].
By default `GtkSearchBar` and `AdwTabBar` look like a part of an `AdwHeaderBar`
and are intended to be used directly attached to one or used as
[class@ToolbarView] toolbars. With the `.inline` style class they have neutral
backgrounds and can be used in different contexts instead.
When used with `GtkTextView`, it allows it to e.g. be put into a card while
following its styles.
:::note
The `.inline` style class cannot be used with `GtkSourceView`.
# Undershoot Indicators
<picture>
<source srcset="undershoot-dark.png" media="(prefers-color-scheme: dark)">
<img src="undershoot.png" alt="undershoot">
</picture>
The `.undershoot-top`, `.undershoot-bottom`, `.undershoot-start` and
`.undershoot-end` style classes can be used with [class@Gtk.ScrolledWindow] to
add an undershoot indicator on the given edge, presented as a shadow.
`.undershoot-start` and `.undershoot-end` automatically follow text direction,
same as [property@Gtk.Widget:margin-start] and [property@Gtk.Widget:margin-end].
Most applications should use [class@ToolbarView] instead, as it manages
undershoots automatically based on presence and visibility of top and bottom
bars.
Since: 1.4
# Property Rows
<picture>
<source srcset="property-row-dark.png" media="(prefers-color-scheme: dark)">
<img src="property-row.png" alt="property-row">
</picture>
The `.property` style class can be used with [class@ActionRow] and
[class@ExpanderRow]. It deemphasizes the row title and emphasizes subtitle
instead, which is useful for displaying read-only properties, as follows:
```xml
<object class="AdwActionRow">
<property name="title" translatable="yes">Property Name</property>
<property name="subtitle">Value</property>
<property name="subtitle-selectable">True</property>
<style>
<class name="property"/>
</style>
</object>
```
Since: 1.4
The `.monospace` style class with `.property` only makes the subtitle monospace,
but not the title or any extra widgets. To make everything in the row monospace,
apply `.monospace` to the [class@Gtk.ListBox] around the row.
Since: 1.6
# Deprecated Style Classes
The following style classes are deprecated and remain there for compatibility.
They shouldn't be used in new code.
## `.content`
<picture>
<source srcset="boxed-lists-dark.png" media="(prefers-color-scheme: dark)">
<img src="boxed-lists.png" alt="boxed-lists">
</picture>
The `.content` style class can be applied to a [class@Gtk.ListBox] to give it a
boxed list appearance. The [`.boxed-list`](#boxed-lists-cards) style class is
completely equivalent to it and should be used instead.
## `.sidebar`
<picture>
<source srcset="deprecated-sidebar-dark.png" media="(prefers-color-scheme: dark)">
<img src="deprecated-sidebar.png" alt="deprecated-sidebar">
</picture>
The `.sidebar` style class adds a border at the end of the widget (`border-right`
for left-to-right text direction, `border-left` for right-to-left) and removes
background from any [class@Gtk.ListBox] or [class@Gtk.ListView] inside it.
It can be replaced by using the [`.navigation-sidebar`](#sidebars) style class
on the list widget, combined with a [class@Gtk.Separator] to achieve the border.
## `.app-notification`
<picture>
<source srcset="deprecated-app-notification-dark.png" media="(prefers-color-scheme: dark)">
<img src="deprecated-app-notification.png" alt="deprecated-app-notification">
</picture>
The `.app-notification` style class is used with widgets like [class@Gtk.Box].
It adds [`.osd`](#osd) appearance to the widget and makes its bottom corners
round. When used together with a [class@Gtk.Overlay] and a [class@Gtk.Revealer],
it allows creating in-app notifications.
[class@ToastOverlay] can be used to replace it.
## `.large-title`
<picture>
<source srcset="typography-large-title-dark.png" media="(prefers-color-scheme: dark)">
<img src="typography-large-title.png" alt="typography-large-title">
</picture>
The `.large-title` style class makes text large and thin. It's the largest
style, infrequently used for display headings in greeters or assistants. It
should only be used in conjunction with large amounts of whitespace.
The [`.title-1`](#titles) style class should be used instead.
Deprecated since: 1.2
## Flat Header Bar
<picture>
<source srcset="flat-header-bar-dark.png" media="(prefers-color-scheme: dark)">
<img src="flat-header-bar.png" alt="flat-header-bar">
</picture>
The `.flat` style class can be used with an [class@HeaderBar] or
[class@Gtk.HeaderBar] to give it a flat appearance.
Use [class@ToolbarView] instead.
Deprecated since: 1.4
## `.opaque`
<picture>
<source srcset="buttons-opaque-dark.png" media="(prefers-color-scheme: dark)">
<img src="buttons-opaque.png" alt="buttons-opaque">
</picture>
The `.opaque` style class gives the button an opaque background. It's intended
to be used together with custom styles that override `background-color` and
`color`, to create buttons with an appearance similar to
[`.suggested-action`](#suggested-action), but with custom colors.
For example, `.suggested-action` is equivalent to using the `.opaque` style
using the `.opaque` style
class with the following CSS:
```css
#custom-suggested-action-button {
background-color: var(--accent-bg-color);
color: var(--accent-fg-color);
}
```
It can be used in combination with [`.circular`](#circular) or [`.pill`](#pill).
Can also be used with [class@Gtk.MenuButton] or [class@SplitButton].
Use [`.suggested-action`](#suggested-action) instead, and override the accent
color, for example:
```css
#custom-destructive-action-button {
--accent-bg-color: var(--destructive-bg-color);
--accent-fg-color: var(--destructive-fg-color);
--accent-color: var(--destructive-color);
}
```
Deprecated since: 1.6
## `.dim-label`
<picture>
<source srcset="dimmed-dark.png" media="(prefers-color-scheme: dark)">
<img src="dimmed.png" alt="dim-label">
</picture>
The `.dim-label` style class makes the widget it's applied to partially
transparent.
The opacity changes between regular and high contrast styles and is represented
by the [`--dim-opacity`](css-variables.html#opacity) variable. Use that variable
if the style class cannot be used directly.
The [`.dimmed`](#dimmed) style class is completely equivalent to it and should
be used instead.
Deprecated since: 1.7
|