File tree Expand file tree Collapse file tree 2 files changed +39
-0
lines changed Expand file tree Collapse file tree 2 files changed +39
-0
lines changed Original file line number Diff line number Diff line change 1+ /* *
2+ * Align
3+ *
4+ * exemples :
5+ *
6+ * #{ context-align("wide") } .block#{ context-align() } {
7+ * ... your css
8+ * }
9+ *
10+ * return for style.scss :
11+ * .block.alignwide {
12+ * ... your css
13+ * }
14+ *
15+ * return for editor-style.scss :
16+ * [data-align="wide"] > .block {
17+ * ... your css
18+ * }
19+ *
20+ */
21+
22+ $function-context-align-last-value : " " ;
23+
24+ @function context-align ($value : null , $suffix : " > " ) {
25+ @if ($value == null) {
26+ @if ($entry-file-name == " style" ) {
27+ @return " .align" + $function-context-align-last-value ;
28+ }
29+ } @else {
30+ $function-context-align-last-value : $value !global;
31+
32+ @if ($entry-file-name == " editor-style" ) {
33+ @return " [data-align=\" " + $value + " \" ]" + $suffix ;
34+ }
35+ }
36+
37+ @return " " ;
38+ }
Original file line number Diff line number Diff line change 88
99@import " ./f-assign-inputs" ;
1010@import " ./f-column" ;
11+ @import " ./f-context-align" ;
1112@import " ./f-context-selector" ;
1213@import " ./f-easings" ;
1314@import " ./f-em" ;
You can’t perform that action at this time.
0 commit comments