-
Notifications
You must be signed in to change notification settings - Fork 43
/
_alignment.scss
55 lines (49 loc) · 1.06 KB
/
_alignment.scss
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
////
/// Alignment classes.
///
/// Primarily, we use this to build out style rules for the core WordPress
/// `.align*` classes.
///
/// @group Utilities
/// @author Justin Tadlock <justintadlock@gmail.com>
/// @link https://themehybrid.com/themes/mythic
////
// Left alignment.
.alignleft {
@media( min-width: content-width() / 2 ) {
float: left;
margin: 0 1.5rem 1.5rem 0;
max-width: 50%;
}
}
// Right alignment.
.alignright {
@media( min-width: content-width() / 2 ) {
float: left;
margin: 0 0 1.5rem 1.5rem;
max-width: 50%;
}
}
// Center alignment.
.aligncenter {
display: block;
margin-left: auto;
margin-right: auto;
text-align: center;
clear: both;
}
// Align full and wide classes.
.alignfull,
.alignwide {
margin-left : calc( -100vw / 2 + 100% / 2 );
margin-right : calc( -100vw / 2 + 100% / 2 );
width: auto;
max-width: 100vw;
}
@media( min-width: content-width() ) {
.alignwide {
margin-left : -25%;
margin-right : -25%;
max-width : calc( #{ content-width() } + 50% );
}
}