We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4fa9c7f commit 8b46646Copy full SHA for 8b46646
src/scss/abstract/_f-align.scss
@@ -0,0 +1,38 @@
1
+/**
2
+ * Align
3
+ *
4
+ * exemples :
5
6
+ * #{ align("wide") } .block#{ align() } {
7
+ * ... your css
8
+ * }
9
10
+ * return for style.scss :
11
+ * .block.alignwide {
12
13
14
15
+ * return for editor-style.scss :
16
+ * [data-align="wide"] > .block {
17
18
19
20
+ */
21
+
22
+$function-align-last-value: "";
23
24
+@function align($value: null, $suffix: " > ") {
25
+ @if ($value == null) {
26
+ @if ($entry-file-name == "style") {
27
+ @return ".align" + $function-align-last-value;
28
+ }
29
+ } @else {
30
+ $function-align-last-value: $value;
31
32
+ @if ($entry-file-name == "editor-style") {
33
+ @return "[data-align=\"" + $value + "\"]" + $suffix;
34
35
36
37
+ @return "";
38
+}
0 commit comments