Skip to content

No-inherit mode #18

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

Closed
zlatanvasovic opened this issue Mar 6, 2014 · 6 comments
Closed

No-inherit mode #18

zlatanvasovic opened this issue Mar 6, 2014 · 6 comments

Comments

@zlatanvasovic
Copy link

There should be a way to avoid inheritance over subdomains.

E.g. <prefix>g.yxqyang.asia.css shouldn't apply to gist.github.com.

@stewart
Copy link
Owner

stewart commented Mar 8, 2014

I think the inheritance is nice, but the way it currently works, if you visit http://gist.github.com dcssd will load and serve the following ~/.css files, in this order:

  • ~/.css/default.css
  • ~/.css/gist.github.com.css
  • ~/.css/g.yxqyang.asia.css

So, unfortunately, this means that any styles defined in gist.github.com.css are likely to be clobbered by g.yxqyang.asia.css. The best way to deal with this while maintaining inheritance might be to ensure subdomain CSS is loaded later in the order, perhaps doing a ascending order of length? So the order would become:

  • ~/.css/default.css
  • ~/.css/g.yxqyang.asia.css
  • ~/.css/gist.github.com.css

Does this seem more like what you're looking for? Then you can have global GitHub styles in g.yxqyang.asia.css and overwrite them if need be in gist.github.com.css.

@stewart
Copy link
Owner

stewart commented Mar 8, 2014

I'm remiss to offer 'modes' since I think something like dotcss should have zero configuration. You install it, it serves CSS. That's it.

@zlatanvasovic
Copy link
Author

No, that's not it. I want to avoid loading of the github.com styles on
gist.github.com.

2014-03-08 22:06 GMT+01:00 Andrew Stewart [email protected]:

I'm remiss to offer 'modes' since I think something like dotcss should
have zero configuration. You install it, it serves CSS. That's it.


Reply to this email directly or view it on GitHubhttps://github.com//issues/18#issuecomment-37109888
.

Zlatan Vasović - ZDroid

@stewart
Copy link
Owner

stewart commented Mar 8, 2014

I've found having the subdomains load the root domain css more useful than not, and it's also the behaviour in defunkt/dotjs, so I'm opting to stick with that for now. If you really do want that behaviour, the most straightforward way (I think?) to get it would be to fork dotcss and apply a patch like this.

@stewart stewart closed this as completed Mar 8, 2014
@zlatanvasovic
Copy link
Author

I didn't thought about something like that. :D

My idea was:

dotcss should ignore parent domain styles if there is a subdomain styles that are in the file prefixed with underscore (or whatever prefix else).

So, if there is a _gist.github.com.css file, g.yxqyang.asia.css shouldn't be loaded.

@psynaptic
Copy link
Contributor

I actually really like the idea.

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

No branches or pull requests

3 participants