-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathCaption.scss
More file actions
executable file
·74 lines (72 loc) · 1.92 KB
/
Caption.scss
File metadata and controls
executable file
·74 lines (72 loc) · 1.92 KB
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
///
/// Punica CSS Framework
/// Module : Caption
///
@use "../../Core/Global/Getters" as *;
@use "../../Core/Global/Options" as *;
@use "../../Core/Global/Mixins" as *;
@use "../../Core/Theme/Setters" as *;
@if enabled('caption') {
.#{class('caption', 'name')} {
display : flex;
align-items: center;
text-align : module('caption', 'text-align');
margin : module('caption', 'margin');
font-size : module('caption', 'font-size');
font-family: module('caption', 'font-family');
font-weight: module('caption', 'font-weight');
line-height: module('caption', 'line-height');
text-wrap : module('caption', 'text-wrap');
>img,
>i {
margin-right: module('caption', 'media', 'margin');
font-size: module('caption', 'font-size') * 1.4;
}
&.#{class('caption', 'divided')} {
border-bottom : set-border();
padding-bottom: module('caption', 'media', 'margin');
}
&>a,
&>span,
&>div {
/// ..children of a flex container are
/// forced to have a block-flavored display type.
display: contents;
}
&.#{class('caption', 'centered')} {
flex-direction: column;
text-align : center;
margin : inherit;
>img,
>i {
margin-right : unset;
margin-bottom: 2rem;
}
}
///
/// SIZES
///
@if features('caption', 'sizes') {
@each $size-name, $margin, $font-size, $font-weight in module('caption', 'sizes') {
@include set-size($font-size, null, $size-name) {
margin : $margin;
font-weight: $font-weight;
>i {
font-size: $font-size * 1.4;
}
};
}
}
//
@include breakpoints(module('grid', 'breakpoints', 'medium'), 'max-width') {
flex-direction: column;
text-align : center;
margin : inherit;
>img,
>i {
margin-right : unset;
margin-bottom: 2rem;
}
}
}
}