Skip to content

Commit

Permalink
Create admin-base.scss for css that will also be used in the admin in…
Browse files Browse the repository at this point in the history
…terface

Looking at the current implementation in package.json regarding generating styles that are used in the admin interface, it is not very scalable or readable.

I suggest creating a admin-base css which will be included in the admin interface, and then import the necessary styles into that.

Currently, this should only be opening-hours-editor and material-search css. Wysiwyg is special and will stay the way it is.

DDFFORM-611
  • Loading branch information
LasseStaus committed Jun 17, 2024
1 parent 02f451f commit 31f236b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions admin-base.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
@import "./src/styles/scss/tools";

// CSS sheets that are used to style the admin interface.
@import "./src/stories/Library/opening-hours-editor/opening-hours-editor";
@import "./src/stories/Library/material-search/material-search";
@import "./src/stories/Library/cover/cover";
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"css:lint": "concurrently 'yarn:css:stylelint' 'yarn:css:prettier -- --check' --raw",
"css:lint:watch": "chokidar 'src/**/*.scss' -c 'yarn css:lint'",
"css:format": "concurrently 'yarn:css:stylelint -- --fix' 'yarn:css:prettier -- --write' --max-processes 1 --raw",
"css:build": "sass base.scss:src/styles/css/base.css wysiwyg.scss:src/styles/css/wysiwyg.css src/stories/Library/opening-hours-editor/opening-hours-editor.scss:src/styles/css/opening-hours-editor.css --style compressed",
"css:build": "sass base.scss:src/styles/css/base.css wysiwyg.scss:src/styles/css/wysiwyg.css admin-base.scss:src/styles/css/admin-base.css --style compressed",
"css:watch": "yarn css:build -- --watch",
"build": "concurrently 'yarn:css:build' --raw",
"markdown:lint": "markdownlint-cli2",
Expand Down

0 comments on commit 31f236b

Please sign in to comment.