Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions demo/Views/CSSView.vala
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,11 @@ public class CSSView : DemoPage {
};
small.add_css_class (Granite.CssClass.SMALL);

var mono = new Gtk.Label ("\"Granite.CssClass.MONOSPACE\"") {
margin_bottom = 12
};
mono.add_css_class (Granite.CssClass.MONOSPACE);

var card_header = new Granite.HeaderLabel ("Cards and Headers") {
secondary_text = "\"Granite.CssClass.CARD\" and \"Granite.CssClass.CHECKERBOARD\""
};
Expand All @@ -63,6 +68,7 @@ public class CSSView : DemoPage {
card.append (header4);
card.append (numeric);
card.append (small);
card.append (mono);

var card_checkered = new Granite.Bin () {
child = new Gtk.Image.from_icon_name ("battery-low") {
Expand Down
5 changes: 5 additions & 0 deletions lib/Constants.vala
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,11 @@ namespace Granite {
* Style class for widgets in warning state.
*/
public const string WARNING = "warning";

/**
* Style class for non-terminal text that uses a monospace font.
*/
public const string MONOSPACE = "monospace";
}

/**
Expand Down
4 changes: 4 additions & 0 deletions lib/Styles/Gtk/_classes.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,7 @@
border-spacing: $button-spacing;
padding: $button-spacing;
}

.monospace {
font-family: monospace;
}