-
Notifications
You must be signed in to change notification settings - Fork 33
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
Css changes #913
Css changes #913
Conversation
"emulator": "npm run dist:staging && npm run prefirebase && cd public && firebase emulators:start" | ||
"emulator": "npm run dist:staging && npm run prefirebase && cd public && firebase emulators:start", | ||
"build:css": "tailwindcss -i ./src/styles/tailwind.css -o ./dist/tailwind.css", | ||
"watch:css": "tailwindcss -i ./src/styles/tailwind.css -o ./dist/tailwind.css --watch" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You shouldn't need the tailwindcss cli if you're using postcss-loader in the webpack config.
@@ -9,7 +9,7 @@ import styles from './Logo.module.scss'; | |||
* @category Components | |||
*/ | |||
const Logo = ({ onToggleEdit, isEditor }) => ( | |||
<div className={styles.wrapper}> | |||
<div className="flex items-center space-x-2"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you use display flex, prefer using gap-2 instead of space-x-2 that uses margins on children.
@@ -335,14 +335,12 @@ export default class SceneGraph extends React.Component { | |||
// Outliner class names. | |||
const className = classNames({ | |||
outliner: true, | |||
hide: this.state.leftBarHide | |||
hide: this.state.leftBarHide, | |||
'mt-16': true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As a general note, avoid margin as much as possible, even forbid it, use padding instead if you want components to be reusable. Space between elements should be set by the parent element on its children (via flex gap for example). Here you should really modify the top value for the outliner class instead of adding a margin.
potentially negative side effects