Skip to content

Commit 9fa2d36

Browse files
committed
Move Sass from legacy imports to new module system
1 parent ae950c4 commit 9fa2d36

File tree

16 files changed

+49
-23
lines changed

16 files changed

+49
-23
lines changed

src/api/_constants.scss

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,3 +69,11 @@ $draftail-page-overlay-z-index: $draftail-toolbar-z-index + 10 !default;
6969
-webkit-font-smoothing: antialiased;
7070
-moz-osx-font-smoothing: grayscale;
7171
}
72+
73+
// This makes it possible to add styles to rich text content within the editor,
74+
// without Draftail users having to know exactly which Draft.js class to use.
75+
@mixin draftail-richtext-styles {
76+
.#{$DRAFTAIL}Editor .DraftEditor-editorContainer {
77+
@content;
78+
}
79+
}

src/blocks/DividerBlock.scss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
@use "../api/constants" as *;
2+
13
.#{$DRAFTAIL}DividerBlock {
24
border: 0;
35
background: $color-light-grey;

src/components/ComboBox/ComboBox.scss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
@use "../../api/constants" as *;
2+
13
@mixin sr-only() {
24
position: absolute;
35
width: 1px;

src/components/DraftailEditor.scss

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
@use "../api/constants" as *;
2+
13
.#{$DRAFTAIL}Editor {
24
--draftail-offset-inline-start: 2rem;
35
--draftail-text-direction: 1;
@@ -65,11 +67,3 @@
6567
.#{$DRAFTAIL}Editor .public-DraftEditorPlaceholder-inner {
6668
margin: $draftail-block-spacing 0;
6769
}
68-
69-
// This makes it possible to add styles to rich text content within the editor,
70-
// without Draftail users having to know exactly which Draft.js class to use.
71-
@mixin draftail-richtext-styles {
72-
.#{$DRAFTAIL}Editor .DraftEditor-editorContainer {
73-
@content;
74-
}
75-
}

src/components/Icon.scss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
@use "../api/constants" as *;
2+
13
.#{$DRAFTAIL}Icon {
24
fill: currentColor;
35
pointer-events: none;

src/components/PlaceholderStyles/PlaceholderStyles.scss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
@use "../../api/constants" as *;
2+
13
// Avoid styling list items as they commonly have markers in the ::before pseudo element.
24
.#{$DRAFTAIL}block--empty:not([class*="-list-item"])::before {
35
position: absolute;

src/components/Toolbar/BlockToolbar/BlockToolbar.scss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
@use "../../../api/constants" as *;
2+
13
.#{$DRAFTAIL}BlockToolbar {
24
// stylelint-disable-next-line property-disallowed-list
35
float: left;

src/components/Toolbar/FloatingToolbar/FloatingToolbar.scss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
@use "../../../api/constants" as *;
2+
13
.#{$DRAFTAIL}FloatingToolbar {
24
padding: $controls-spacing;
35
background-color: $draftail-editor-chrome;

src/components/Toolbar/InlineToolbar.scss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
@use "../../api/constants" as *;
2+
13
$button-size: 1.5rem;
24

35
.#{$DRAFTAIL}ToolbarButton--pin {

src/components/Toolbar/MetaToolbar.scss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
@use "../../api/constants" as *;
2+
13
.#{$DRAFTAIL}MetaToolbar {
24
position: relative;
35
display: flex;

0 commit comments

Comments
 (0)