Merge branch 'MDL-57176-master' of git://github.com/damyon/moodle
[moodle.git] / theme / boost / scss / moodle / icons.scss
CommitLineData
072364df
DW
1// The only class we need for icons is .icon
2// Standardize the size, padding and alignment for all icons in Moodle.
3.icon {
4 width: 16px;
5 height: 16px;
6 vertical-align: middle;
7 margin: 0;
8 padding: 0;
9 box-sizing: content-box;
10 margin-right: 0.5rem;
11}
12
13a:first-of-type > .icon {
14 margin-left: 0.5rem;
15}
16
60ff24c0
RW
17// Fix the first icon for an action menu. This rule exists to reverse the
18// icon margin defined in the a:first-of-type > .icon rule.
19.action-menu .dropdown a:first-of-type > .icon {
20 margin-left: 0;
21}
22
4821f459
DW
23.pull-xs-right {
24 .icon {
25 margin-right: 0;
26 margin-left: 0.5rem;
27 }
28}
29
6321934c
FM
30// Fix the space between the dropdown icon and the caret.
31.action-menu {
32 .dropdown-toggle {
33 .icon {
34 // Use a negative margin on the icon to ensure that the dropdown toggle
35 // is an icon and not just text in which case the margin is needed.
36 margin-right: -$caret-width;
37 }
38 }
072364df 39}
b843914d
FM
40
41// YUI 2 Tree View icons must not have a margin left.
42.ygtvcell .icon {
5142f564 43 margin-left: 0 !important; /* stylelint-disable-line declaration-no-important */
b843914d 44}
137c289a
FM
45
46// In the navigation, tree icons should not have margins.
47.block_navigation,
48.block_settings {
49 .tree_item .icon {
50 margin-left: 0;
51 }
52}
99061152
DW
53
54[data-action=toggle-drawer] .icon {
947970fc 55 margin: 0;
99061152 56}