loomcss 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.gitignore +16 -0
- data/.nvmrc +1 -0
- data/.stylelintrc +6 -0
- data/Gemfile +4 -0
- data/LICENSE +21 -0
- data/README.md +161 -0
- data/Rakefile +2 -0
- data/assets/loom/10-global-settings/_box-sizing.scss +5 -0
- data/assets/loom/10-global-settings/_breakpoints.scss +22 -0
- data/assets/loom/10-global-settings/_color.scss +79 -0
- data/assets/loom/10-global-settings/_icons.scss +5 -0
- data/assets/loom/10-global-settings/_misc.scss +89 -0
- data/assets/loom/10-global-settings/_spacing.scss +20 -0
- data/assets/loom/10-global-settings/_typography.scss +201 -0
- data/assets/loom/20-tools/_color.scss +22 -0
- data/assets/loom/20-tools/_grid-columns.scss +23 -0
- data/assets/loom/20-tools/_icons.scss +16 -0
- data/assets/loom/20-tools/_misc.scss +12 -0
- data/assets/loom/20-tools/_mq.scss +126 -0
- data/assets/loom/20-tools/_spacing.scss +14 -0
- data/assets/loom/20-tools/_transition.scss +10 -0
- data/assets/loom/20-tools/_type-checking.scss +52 -0
- data/assets/loom/20-tools/_typography.scss +130 -0
- data/assets/loom/20-tools/_z-index.scss +16 -0
- data/assets/loom/30-generic/_box-sizing.scss +9 -0
- data/assets/loom/30-generic/_normalize.scss +461 -0
- data/assets/loom/30-generic/_reset.scss +48 -0
- data/assets/loom/40-base-elements/_form-items.scss +50 -0
- data/assets/loom/40-base-elements/_images.scss +5 -0
- data/assets/loom/40-base-elements/_typography.scss +138 -0
- data/assets/loom/50-layout/_grid.scss +37 -0
- data/assets/loom/60-objects/_absolute-center.scss +18 -0
- data/assets/loom/60-objects/_absolute-cover.scss +19 -0
- data/assets/loom/60-objects/_button.scss +93 -0
- data/assets/loom/60-objects/_clearfix.scss +19 -0
- data/assets/loom/60-objects/_container.scss +34 -0
- data/assets/loom/60-objects/_fixed-ratio.scss +42 -0
- data/assets/loom/60-objects/_headings.scss +28 -0
- data/assets/loom/60-objects/_hide-visually.scss +23 -0
- data/assets/loom/60-objects/_icon.scss +30 -0
- data/assets/loom/60-objects/_list-inline.scss +37 -0
- data/assets/loom/60-objects/_list-reset.scss +25 -0
- data/assets/loom/60-objects/_media.scss +35 -0
- data/assets/loom/60-objects/_vertical-center.scss +18 -0
- data/assets/loom/70-ui-components/_example.scss +22 -0
- data/assets/loom/80-utilities/_background-color.scss +13 -0
- data/assets/loom/80-utilities/_border.scss +10 -0
- data/assets/loom/80-utilities/_color.scss +13 -0
- data/assets/loom/80-utilities/_display.scss +31 -0
- data/assets/loom/80-utilities/_font-family.scss +20 -0
- data/assets/loom/80-utilities/_font-size.scss +24 -0
- data/assets/loom/80-utilities/_font-style.scss +15 -0
- data/assets/loom/80-utilities/_font-weight.scss +15 -0
- data/assets/loom/80-utilities/_line-height.scss +0 -0
- data/assets/loom/80-utilities/_margin.scss +33 -0
- data/assets/loom/80-utilities/_padding.scss +32 -0
- data/assets/loom/80-utilities/_position.scss +15 -0
- data/assets/loom/80-utilities/_text-align.scss +19 -0
- data/assets/loom/80-utilities/_text-transform.scss +19 -0
- data/assets/loom/80-utilities/_vertical-align.scss +26 -0
- data/assets/loom/80-utilities/_white-space.scss +27 -0
- data/assets/loom/80-utilities/_width.scss +11 -0
- data/assets/loom/90-trumps/.keepfile +0 -0
- data/assets/loom/_10-global-settings.scss +7 -0
- data/assets/loom/_20-tools.scss +10 -0
- data/assets/loom/_30-generic.scss +2 -0
- data/assets/loom/_40-base-elements.scss +3 -0
- data/assets/loom/_50-layout.scss +1 -0
- data/assets/loom/_60-objects.scss +13 -0
- data/assets/loom/_70-ui-components.scss +0 -0
- data/assets/loom/_80-utilities.scss +17 -0
- data/assets/loom/_90-trumps.scss +0 -0
- data/assets/main-shorthand.scss +44 -0
- data/assets/main.scss +108 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/gulpfile.js +24 -0
- data/index.html +97 -0
- data/lib/loomcss.rb +2 -0
- data/lib/loomcss/engine.rb +9 -0
- data/lib/loomcss/version.rb +3 -0
- data/loomcss.gemspec +32 -0
- data/main.css +1298 -0
- data/package.json +36 -0
- data/public/docs/assets/images/favicon.png +0 -0
- data/public/docs/assets/images/logo_full_compact.svg +1 -0
- data/public/docs/assets/images/logo_full_inline.svg +1 -0
- data/public/docs/assets/images/logo_light_compact.svg +1 -0
- data/public/docs/assets/images/logo_light_inline.svg +1 -0
- data/public/docs/assets/js/main.js +56 -0
- data/public/docs/assets/js/main.min.js +1 -0
- data/public/docs/assets/js/search.js +146 -0
- data/public/docs/assets/js/sidebar.js +163 -0
- data/public/docs/assets/js/vendor/fuse.min.js +20 -0
- data/public/docs/assets/js/vendor/jquery.min.js +4 -0
- data/public/docs/assets/js/vendor/prism.min.js +9 -0
- data/public/docs/index.html +314 -0
- metadata +172 -0
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/* http://meyerweb.com/eric/tools/css/reset/
|
|
2
|
+
v2.0 | 20110126
|
|
3
|
+
License: none (public domain)
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
html, body, div, span, applet, object, iframe,
|
|
7
|
+
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
|
|
8
|
+
a, abbr, acronym, address, big, cite, code,
|
|
9
|
+
del, dfn, em, img, ins, kbd, q, s, samp,
|
|
10
|
+
small, strike, strong, sub, sup, tt, var,
|
|
11
|
+
b, u, i, center,
|
|
12
|
+
dl, dt, dd, ol, ul, li,
|
|
13
|
+
fieldset, form, label, legend,
|
|
14
|
+
table, caption, tbody, tfoot, thead, tr, th, td,
|
|
15
|
+
article, aside, canvas, details, embed,
|
|
16
|
+
figure, figcaption, footer, header, hgroup,
|
|
17
|
+
menu, nav, output, ruby, section, summary,
|
|
18
|
+
time, mark, audio, video {
|
|
19
|
+
margin: 0;
|
|
20
|
+
padding: 0;
|
|
21
|
+
border: 0;
|
|
22
|
+
font-size: 100%;
|
|
23
|
+
font: inherit;
|
|
24
|
+
vertical-align: baseline;
|
|
25
|
+
}
|
|
26
|
+
/* HTML5 display-role reset for older browsers */
|
|
27
|
+
article, aside, details, figcaption, figure,
|
|
28
|
+
footer, header, hgroup, menu, nav, section {
|
|
29
|
+
display: block;
|
|
30
|
+
}
|
|
31
|
+
body {
|
|
32
|
+
line-height: 1;
|
|
33
|
+
}
|
|
34
|
+
ol, ul {
|
|
35
|
+
list-style: none;
|
|
36
|
+
}
|
|
37
|
+
blockquote, q {
|
|
38
|
+
quotes: none;
|
|
39
|
+
}
|
|
40
|
+
blockquote:before, blockquote:after,
|
|
41
|
+
q:before, q:after {
|
|
42
|
+
content: '';
|
|
43
|
+
content: none;
|
|
44
|
+
}
|
|
45
|
+
table {
|
|
46
|
+
border-collapse: collapse;
|
|
47
|
+
border-spacing: 0;
|
|
48
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/// Default color for inputs
|
|
2
|
+
/// @group 40-base-elements
|
|
3
|
+
$LOOM-input-color: $LOOM-color-dark-gray !default;
|
|
4
|
+
|
|
5
|
+
/// Default color for inputs (placeholder text)
|
|
6
|
+
/// @group 40-base-elements
|
|
7
|
+
$LOOM-input-placeholder-color: $LOOM-color-medium-gray !default;
|
|
8
|
+
|
|
9
|
+
/// Default color for borders
|
|
10
|
+
/// @group 40-base-elements
|
|
11
|
+
$LOOM-input-border-color: $LOOM-color-medium-gray !default;
|
|
12
|
+
|
|
13
|
+
/// Default padding for texty inputs
|
|
14
|
+
/// @group 40-base-elements
|
|
15
|
+
$LOOM-input-padding: get-spacing(xsmall);
|
|
16
|
+
|
|
17
|
+
input[type=text],
|
|
18
|
+
input[type=url],
|
|
19
|
+
input[type=tel],
|
|
20
|
+
input[type=number],
|
|
21
|
+
input[type=color],
|
|
22
|
+
input[type=email],
|
|
23
|
+
input[type=date],
|
|
24
|
+
input[type=datetime],
|
|
25
|
+
input[type=month],
|
|
26
|
+
input[type=password],
|
|
27
|
+
input[type=search],
|
|
28
|
+
input[type=week],
|
|
29
|
+
input[type=time] {
|
|
30
|
+
border: $LOOM-border-width $LOOM-border-style $LOOM-input-border-color;
|
|
31
|
+
border-radius: $LOOM-border-radius;
|
|
32
|
+
color: $LOOM-input-color;
|
|
33
|
+
padding: $LOOM-input-padding;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
input {
|
|
37
|
+
&::placeholder {
|
|
38
|
+
color: $LOOM-input-placeholder-color;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
textarea {
|
|
43
|
+
border: $LOOM-border-width $LOOM-border-style $LOOM-input-border-color;
|
|
44
|
+
color: $LOOM-input-color;
|
|
45
|
+
padding: $LOOM-input-padding;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
label {
|
|
49
|
+
font-weight: $LOOM-font-weight-bold;
|
|
50
|
+
}
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
/// Default color for the html root
|
|
2
|
+
/// @group 40-base-elements
|
|
3
|
+
$LOOM-html-color: $LOOM-color-black !default;
|
|
4
|
+
|
|
5
|
+
/// Default background color for the html root
|
|
6
|
+
/// @group 40-base-elements
|
|
7
|
+
$LOOM-html-background-color: $LOOM-color-white !default;
|
|
8
|
+
|
|
9
|
+
/// Default color for links
|
|
10
|
+
/// @group 40-base-elements
|
|
11
|
+
$LOOM-a-color: $LOOM-color-medium-gray !default;
|
|
12
|
+
|
|
13
|
+
/// Default color for links (visited)
|
|
14
|
+
/// @group 40-base-elements
|
|
15
|
+
$LOOM-a-color-visited: $LOOM-color-dark-gray !default;
|
|
16
|
+
|
|
17
|
+
/// Default color for links (hover)
|
|
18
|
+
/// @group 40-base-elements
|
|
19
|
+
$LOOM-a-color-hover: $LOOM-color-black !default;
|
|
20
|
+
|
|
21
|
+
/// Check to see if a "default" font is available in the global font LOOM-font-list
|
|
22
|
+
/// @group 40-base-elements
|
|
23
|
+
$LOOM-font-size-default-available: if(get-font-size(default), true, false) !default;
|
|
24
|
+
|
|
25
|
+
html {
|
|
26
|
+
background: $LOOM-html-background-color;
|
|
27
|
+
color: $LOOM-html-color;
|
|
28
|
+
font-family: $LOOM-font-family-primary-default;
|
|
29
|
+
line-height: $LOOM-line-height;
|
|
30
|
+
|
|
31
|
+
@if $LOOM-font-size-default-available {
|
|
32
|
+
@include font-size(default, smaller-viewport);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
@else {
|
|
36
|
+
font-size: $LOOM-font-size-on-smaller-screens;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.#{$LOOM-fonts-loaded} & { // NOTE: make use of a font loading system here
|
|
40
|
+
font-family: $LOOM-font-family-primary-webfont;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
// At $LOOM-typography-breakpoint larger fonts will be used. This is because you typically want small fonts on mobile, larger on desktop.
|
|
45
|
+
@include mq($from: $LOOM-typography-breakpoint) {
|
|
46
|
+
html {
|
|
47
|
+
@if $LOOM-font-size-default-available {
|
|
48
|
+
@include font-size(default, larger-viewport);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
@else {
|
|
52
|
+
font-size: $LOOM-font-size-on-larger-screens;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
a {
|
|
58
|
+
color: $LOOM-a-color;
|
|
59
|
+
transition: get-transition(color);
|
|
60
|
+
|
|
61
|
+
&:visited {
|
|
62
|
+
color: $LOOM-a-color-visited;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
&:hover,
|
|
66
|
+
&:focus {
|
|
67
|
+
color: $LOOM-a-color-hover;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
p {
|
|
72
|
+
margin: 0 0 $LOOM-spacing-vertical;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
@if ($LOOM-generate-sizes-for-default-headings) {
|
|
76
|
+
// Make all headings use a sizing heirarchy.
|
|
77
|
+
h1,
|
|
78
|
+
h2,
|
|
79
|
+
h3,
|
|
80
|
+
h4,
|
|
81
|
+
h5,
|
|
82
|
+
h6 {
|
|
83
|
+
@include generic-heading;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
// Give each base element heading a value as described in $LOOM-h-element-sizes.
|
|
87
|
+
@each $name, $value in $LOOM-h-element-sizes {
|
|
88
|
+
#{$name} {
|
|
89
|
+
@include font-size($value, smaller-viewport);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
// At $LOOM-typography-breakpoint larger fonts will be used. This is because you typically want small fonts on mobile, larger on desktop.
|
|
94
|
+
@include mq($from: $LOOM-typography-breakpoint) {
|
|
95
|
+
@each $name, $value in $LOOM-h-element-sizes {
|
|
96
|
+
#{$name} {
|
|
97
|
+
@include font-size($value, larger-viewport);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
} @else { // stylelint-disable-line
|
|
102
|
+
// Just give each HTML heading the same size.
|
|
103
|
+
// We equalise the sizes so that semantic values do not interfere with designs. Sizes must be imparted conciously.
|
|
104
|
+
h1,
|
|
105
|
+
h2,
|
|
106
|
+
h3,
|
|
107
|
+
h4,
|
|
108
|
+
h5,
|
|
109
|
+
h6 {
|
|
110
|
+
@include generic-heading($margin-size: 0, $font-weight: $LOOM-font-weight-normal);
|
|
111
|
+
|
|
112
|
+
@if $LOOM-font-size-default-available {
|
|
113
|
+
@include font-size(default, smaller-viewport);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
@else {
|
|
117
|
+
font-size: $LOOM-font-size-on-smaller-screens;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
// NOTE: At $LOOM-typography-breakpoint larger fonts will be used. This is because you typically want small fonts on mobile, larger on desktop.
|
|
122
|
+
@include mq($from: $LOOM-typography-breakpoint) {
|
|
123
|
+
h1,
|
|
124
|
+
h2,
|
|
125
|
+
h3,
|
|
126
|
+
h4,
|
|
127
|
+
h5,
|
|
128
|
+
h6 {
|
|
129
|
+
@if $LOOM-font-size-default-available {
|
|
130
|
+
@include font-size(default, larger-viewport);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
@else {
|
|
134
|
+
font-size: $LOOM-font-size-on-larger-screens;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
$LOOM-grid-gutter-value: get-spacing($LOOM-grid-gutter) !default;
|
|
2
|
+
|
|
3
|
+
.l-grid {
|
|
4
|
+
display: flex;
|
|
5
|
+
flex: 0 1 auto;
|
|
6
|
+
flex-direction: row;
|
|
7
|
+
flex-wrap: wrap;
|
|
8
|
+
margin-left: -$LOOM-grid-gutter-value;
|
|
9
|
+
margin-right: -$LOOM-grid-gutter-value;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.l-grid--reverse {
|
|
13
|
+
flex-direction: row-reverse;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.l-grid__item {
|
|
17
|
+
padding-left: $LOOM-grid-gutter-value;
|
|
18
|
+
padding-right: $LOOM-grid-gutter-value;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
@include grid-columns($LOOM-grid-columns);
|
|
22
|
+
|
|
23
|
+
@if variable-exists(LOOM-grid-breakpoints) {
|
|
24
|
+
@each $grid-breakpoint-alias in $LOOM-grid-breakpoints {
|
|
25
|
+
$breakpoint-condition: map-get($LOOM-mq-breakpoints, $grid-breakpoint-alias);
|
|
26
|
+
|
|
27
|
+
@if ($breakpoint-condition) {
|
|
28
|
+
@include mq($from: $grid-breakpoint-alias) {
|
|
29
|
+
@each $i in $LOOM-grid-columns-responsive {
|
|
30
|
+
@include grid-columns($i, \@#{$grid-breakpoint-alias});
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
} @else { // stylelint-disable-line
|
|
34
|
+
@error "It looks like ‘#{$grid-breakpoint-alias}’ does not exist in $LOOM-grid-breakpoints.";
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/// Toggle absolute-center class generation.
|
|
2
|
+
///
|
|
3
|
+
/// By default uses global setting.
|
|
4
|
+
/// @group 60-objects
|
|
5
|
+
$LOOM-use-object-classes-absolute-center: $LOOM-use-object-classes !default;
|
|
6
|
+
|
|
7
|
+
@mixin absolute-center {
|
|
8
|
+
left: 50%;
|
|
9
|
+
position: absolute;
|
|
10
|
+
top: 50%;
|
|
11
|
+
transform: translate(-50%, -50%);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
@if $LOOM-use-object-classes-absolute-center {
|
|
15
|
+
.o-absolute-center {
|
|
16
|
+
@include absolute-center;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/// Toggle absolute-cover class generation.
|
|
2
|
+
///
|
|
3
|
+
/// By default uses global setting.
|
|
4
|
+
/// @group 60-objects
|
|
5
|
+
$LOOM-use-object-classes-absolute-cover: $LOOM-use-object-classes !default;
|
|
6
|
+
|
|
7
|
+
@mixin absolute-cover($distance: 0) {
|
|
8
|
+
bottom: $distance;
|
|
9
|
+
left: $distance;
|
|
10
|
+
position: absolute;
|
|
11
|
+
right: $distance;
|
|
12
|
+
top: $distance;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
@if $LOOM-use-object-classes-absolute-cover {
|
|
16
|
+
.o-absolute-cover {
|
|
17
|
+
@include absolute-cover();
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
/// Toggle button class generation.
|
|
2
|
+
///
|
|
3
|
+
/// By default uses global setting.
|
|
4
|
+
/// @group 60-objects
|
|
5
|
+
$LOOM-use-object-classes-button: $LOOM-use-object-classes !default;
|
|
6
|
+
|
|
7
|
+
$LOOM-button-background-color: $LOOM-color-light-gray !default;
|
|
8
|
+
$LOOM-button-border-color: transparent !default;
|
|
9
|
+
$LOOM-button-color: $LOOM-color-dark-gray !default;
|
|
10
|
+
$LOOM-button-padding-horizontal: get-spacing(small) !default;
|
|
11
|
+
$LOOM-button-padding-vertical: get-spacing(xsmall) !default;
|
|
12
|
+
$LOOM-button-line-height: normal !default;
|
|
13
|
+
|
|
14
|
+
@mixin button(
|
|
15
|
+
$color: $LOOM-button-color,
|
|
16
|
+
$background-color: $LOOM-button-background-color,
|
|
17
|
+
$border-color: $LOOM-button-border-color,
|
|
18
|
+
$border-thickness: $LOOM-border-width,
|
|
19
|
+
$border-radius: $LOOM-border-radius,
|
|
20
|
+
$background-color-hover: null,
|
|
21
|
+
$border-color-hover: null,
|
|
22
|
+
$color-hover: null,
|
|
23
|
+
$padding-horizontal: $LOOM-button-padding-horizontal,
|
|
24
|
+
$padding-vertical: $LOOM-button-padding-vertical,
|
|
25
|
+
$line-height: normal
|
|
26
|
+
) {
|
|
27
|
+
background-color: $background-color;
|
|
28
|
+
border: $border-thickness solid $border-color;
|
|
29
|
+
border-radius: $border-radius;
|
|
30
|
+
color: $color;
|
|
31
|
+
cursor: pointer;
|
|
32
|
+
display: inline-block;
|
|
33
|
+
font: inherit;
|
|
34
|
+
line-height: $line-height;
|
|
35
|
+
padding: $padding-vertical $padding-horizontal;
|
|
36
|
+
text-align: center;
|
|
37
|
+
text-decoration: none;
|
|
38
|
+
transition: get-transition(color), get-transition(background-color);
|
|
39
|
+
user-select: none;
|
|
40
|
+
vertical-align: middle;
|
|
41
|
+
|
|
42
|
+
&:visited {
|
|
43
|
+
color: $color;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
&:hover,
|
|
47
|
+
&:focus {
|
|
48
|
+
// NOTE: Oh, these are horribly ugly. So sorry. I could have made it a ternary operator, but that involved extra variable to store stuff. Look, I'm sorry, okay?
|
|
49
|
+
@if ($background-color-hover != null) {
|
|
50
|
+
background-color: $background-color-hover;
|
|
51
|
+
} @else { // stylelint-disable-line
|
|
52
|
+
background-color: darken($background-color, 20%);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
@if ($border-color-hover != null) {
|
|
56
|
+
border-color: $border-color-hover;
|
|
57
|
+
} @else { // stylelint-disable-line
|
|
58
|
+
border-color: darken($border-color, 20%);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
@if ($color-hover != null) {
|
|
62
|
+
color: $color-hover;
|
|
63
|
+
} @else { // stylelint-disable-line
|
|
64
|
+
color: darken($color, 20%);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
@mixin button__inner() {
|
|
70
|
+
display: inline-block;
|
|
71
|
+
position: relative;
|
|
72
|
+
vertical-align: middle;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
@if $LOOM-use-object-classes-button {
|
|
76
|
+
.o-button {
|
|
77
|
+
@include button();
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.o-button__label {
|
|
81
|
+
@include button__inner();
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
// A round button surrounding an SVG icon.
|
|
85
|
+
.o-button-icon {
|
|
86
|
+
@include button(
|
|
87
|
+
$border-radius: $LOOM-border-radius-circle,
|
|
88
|
+
$padding-horizontal: get-spacing(xsmall),
|
|
89
|
+
$padding-vertical: get-spacing(xsmall),
|
|
90
|
+
$line-height: 1
|
|
91
|
+
);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/// Toggle clearfix class generation.
|
|
2
|
+
///
|
|
3
|
+
/// By default uses global setting.
|
|
4
|
+
/// @group 60-objects
|
|
5
|
+
$LOOM-use-object-classes-clearfix: $LOOM-use-object-classes !default;
|
|
6
|
+
|
|
7
|
+
@mixin clearfix() {
|
|
8
|
+
&::after {
|
|
9
|
+
clear: both;
|
|
10
|
+
content: '';
|
|
11
|
+
display: block;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
@if $LOOM-use-object-classes {
|
|
16
|
+
.o-clearfix {
|
|
17
|
+
@include clearfix();
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/// Toggle container class generation.
|
|
2
|
+
///
|
|
3
|
+
/// By default uses global setting.
|
|
4
|
+
/// @group 60-objects
|
|
5
|
+
$LOOM-use-object-classes-container: $LOOM-use-object-classes !default;
|
|
6
|
+
|
|
7
|
+
@mixin container(
|
|
8
|
+
$max-width: $LOOM-single-column-width,
|
|
9
|
+
$padding-horizontal: get-spacing(default),
|
|
10
|
+
$padding-horizontal-large: get-spacing(large),
|
|
11
|
+
$margin-vertical: get-spacing(default),
|
|
12
|
+
$breakpoint-switch: medium
|
|
13
|
+
) {
|
|
14
|
+
display: block;
|
|
15
|
+
margin-bottom: $margin-vertical;
|
|
16
|
+
margin-left: auto;
|
|
17
|
+
margin-right: auto;
|
|
18
|
+
max-width: $max-width;
|
|
19
|
+
padding-left: $padding-horizontal;
|
|
20
|
+
padding-right: $padding-horizontal;
|
|
21
|
+
transition: get-transition(padding);
|
|
22
|
+
width: 100%;
|
|
23
|
+
|
|
24
|
+
@include mq($from: $breakpoint-switch) {
|
|
25
|
+
padding-left: $padding-horizontal-large;
|
|
26
|
+
padding-right: $padding-horizontal-large;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
@if $LOOM-use-object-classes-container {
|
|
31
|
+
.o-container {
|
|
32
|
+
@include container();
|
|
33
|
+
}
|
|
34
|
+
}
|