Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix CSS compiling issues caused by Tailwind 🤘 #886

Merged
merged 4 commits into from
Oct 21, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .storybook/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ import { withKnobs } from "@storybook/addon-knobs";

require('../styles/bootstrap/_bootstrap.scss');
require('../styles/styleguide/main.scss');
require('../styles/main.scss');
require('../styles/dev.scss');
require('../styles/dev-tailwind-utilities.css');
require('font-awesome/css/font-awesome.css');

function loadStories() {
Expand Down
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,20 +42,20 @@
}
],
"scripts": {
"copy-tailwind": "tailwind build styles/tailwind.css -o dist/styles/tailwind.css",
"copy-styles": "echo Copying Sass settings... && yarn copy-tailwind && copyfiles styles/**/* dist/ && copyfiles styles/main.scss dist/ && copyfiles styles/bootstrap.scss dist/ && copyfiles lib/**/*.scss dist/ && copyfiles lib/**/**/*.scss dist/",
"copy-tailwind": "tailwind build styles/prod-tailwind.css -o dist/styles/tailwind.css",
"copy-styles": "echo Copying Sass settings... && yarn copy-tailwind && copyfiles styles/**/* dist/",
"build:lib": "babel lib/ --out-dir dist/lib",
"build:tailwind:config": "babel tailwind.config.js --out-dir dist",
"build": "yarn build:lib && yarn build:tailwind:config",
"build:with:styles": "yarn build && yarn run copy-styles",
"prepublish": "yarn run build:with:styles",
"build:with:styles": "yarn build && yarn copy-styles",
"prepublish": "yarn build:with:styles",
"storybook": "start-storybook -p 6006 -c .storybook",
"build-storybook": "build-storybook",
"test": "jest --notify || exit 0",
"test:cc": "jest --clearCache",
"test:watch": "jest --notify --watch",
"test:ci": "jest --runInBand",
"tdd": "yarn run test:watch",
"tdd": "yarn test:watch",
"format:js": "prettier --write \"{lib,tests,stories/webapp}/**/*.js\"",
"link:react": "cd ../app/webapp/node_modules/react && yarn link && cd ../../../../gather-ui && yarn link \"react\"",
"unlink:react": "yarn unlink \"react\" && cd ../app/webapp/node_modules/react && yarn unlink && cd ../../../../gather-ui && yarn install --check-files",
Expand All @@ -72,7 +72,7 @@
},
"lint-staged": {
"{lib,tests,stories/webapp}/**/*.js": [
"yarn run prettier --write",
"yarn prettier --write",
"eslint -c .eslintrc.json --fix",
"git add"
]
Expand Down
1 change: 1 addition & 0 deletions styles/dev-tailwind-utilities.css
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@tailwind utilities;
2 changes: 2 additions & 0 deletions styles/dev-tailwind.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
@tailwind base;
@tailwind components;
2 changes: 2 additions & 0 deletions styles/dev.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
@import "dev-tailwind";
@import "main";
8 changes: 8 additions & 0 deletions styles/helpers/_colours.scss
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,11 @@
.color-neutral-base {
color: $neutral-base;
}

.inherit-color-icon .icon path {
@apply fill-current;
}

.inherit-color-link a {
@apply text-current;
}
1 change: 0 additions & 1 deletion styles/main.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
@import 'tailwind';

/* ==========================================================================
@ Settings
Expand Down
3 changes: 3 additions & 0 deletions styles/prod-tailwind.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@tailwind base;
@tailwind components;
@tailwind utilities;
2 changes: 2 additions & 0 deletions styles/prod.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
@import "prod-tailwind";
@import "main";
11 changes: 0 additions & 11 deletions styles/tailwind.css

This file was deleted.