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

Normalize CSS file should only affect torch markup #13

Closed
yulolimum opened this issue Aug 4, 2016 · 3 comments
Closed

Normalize CSS file should only affect torch markup #13

yulolimum opened this issue Aug 4, 2016 · 3 comments
Labels

Comments

@yulolimum
Copy link
Contributor

Here's the issue.

@import my_app_css_files.sass
@import torch_css_files.sass

The app css files are included before torch so you can style torch using my_app variables / mixins / etc. Torch include a css reseter that isn't namespaced.

Two options:

  • namespace normalize
    or...
  • include snippet in docs to make sure people load torch before my_app css files.

Here's an example of how you can namespace the normalize file.

Add an ID to the body in the admin.html layout.

Use a mixin with the normalize styles: https://github.com/infinitered/thesis-phoenix/blob/master/web/static/css/_mixins/_normalize.scss (or create your own, stripping html and body styles).

Include the mixin on the body ID you created: https://github.com/infinitered/thesis-phoenix/blob/master/web/static/css/base/_global.sass#L9


** Thesis files are for reference

@darinwilson
Copy link
Contributor

@yulianglukhenko Do you have a preference on which option to pursue? I'm inclined just make things more explicit in the docs, as we're probably going to want to be more specific about how folks can customize the screens. I think we'd just want to say:

  • for basic customization (colors, fonts, etc): edit the generated _admin_variables.scss file
  • for more detailed customization, add your own sass file below the torch import

I think that would fix this issue and let the user know how to customize anything they see.

@yulolimum
Copy link
Contributor Author

More docs is always great; however, this doesn't fix the issue that some of the torch styles are affecting your custom app's styles if you include them after your styles. If you include them before, then your custom app's styles will affect the torch styles.

I can do a PR to fix this probably tomorrow. I'll probably use the namespaced normalize approach from thesis.

@danielberkompas
Copy link
Contributor

@yulolimum did this ever get done?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants