This repository was archived by the owner on Dec 31, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path_utilities.scss
134 lines (121 loc) · 2.55 KB
/
_utilities.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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
/**
* block_breakpoint
*
* @param str media-size
* @return value breakpoint
**/
@function block_breakpoint($media-size) {
@return map-get(map-get($wp-blocks-options, breakpoint), $media-size);
}
/**
* block_breakpoints
*
* @return map of breakpoints
**/
@function block_breakpoints() {
@return map-get($wp-blocks-options, breakpoint);
}
/**
* block_content_max_width
*
* @return map of breakpoints
**/
@function block_content_max_width() {
@return map-get($wp-blocks-options, content-max-width);
}
/**
* block_spacer
*
* @return spacer value
**/
@function block_spacer() {
@return map-get($wp-blocks-options, spacer);
}
/**
* block_wide_width
*
* @return [.alignwide] width value
**/
@function block_wide_width() {
@return map-get(map-get(map-get($wp-blocks-options, global-block-options), wide-align), width);
}
/**
* block_wide_max_width
*
* @return [.alignwide] max-width value
**/
@function block_wide_max_width() {
@return map-get(map-get(map-get($wp-blocks-options, global-block-options), wide-align), max-width);
}
/**
* block_wide_vertical_margin
*
* @return [.alignwide] margin-top, margin-bottom value
**/
@function block_wide_vertical_margin() {
@return map-get(map-get(map-get($wp-blocks-options, global-block-options), wide-align), vertical-margin);
}
/**
* block_vertical_margin
*
* @return margin-top, margin-bottom value for generic blocks
**/
@function block_vertical_margin() {
@return map-get(map-get($wp-blocks-options, global-block-options), vertical-margin);
}
/**
* block_fontsize
*
* @param $size name of fontsize
*
* @return [.alignwide] margin-top, margin-bottom value
**/
@function block_fontsize($size) {
@return map-get(map-get($wp-blocks-options, fontsize), $size);
}
/**
* block_fontsizes
*
* @return map of font-sizes
**/
@function block_fontsizes() {
@return map-get($wp-blocks-options, fontsize);
}
/**
* block_color
*
* @param $color name of color
*
* @return color value
**/
@function block_color($color) {
@return map-get(map-get($wp-blocks-options, colors), $color);
}
/**
* block_color
*
* @return map of colors
**/
@function block_colors() {
@return map-get($wp-blocks-options, colors);
}
/**
* Option
*
* @param str $block name of block
* @param str $block name of option
*
* @return option value
**/
@function block_option($block, $option) {
@return map_get(map_get(map_get($wp-blocks-options, blocks), $block), $option);
}
/**
* Framework
*
* @return framework selection
*
**/
@function block_framework() {
@return map-get($wp-blocks-options, framework);
}