Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Consider changing the way using hack #44

Open
egoist opened this issue Oct 5, 2016 · 4 comments
Open

Consider changing the way using hack #44

egoist opened this issue Oct 5, 2016 · 4 comments
Labels

Comments

@egoist
Copy link
Owner

egoist commented Oct 5, 2016

Currently you need to add .hack class name to a parent element so that the style of child elements could be affected, but sometimes not all the child elements want to be hacked, so maybe this way is better:

<h1 class="hack-h1">heading 1</h1>

And only theme class name needs to be added to parent element:

<div class="hack-solarized">
  <h1 class="hack-h1">heading 1</h1>
</div>
@egoist egoist changed the title Consider change the way using hack Consider changing the way using hack Oct 5, 2016
@egoist egoist added the discuss label Oct 5, 2016
@dasilvacontin
Copy link

This change would make hack very cumbersome to use.

What's the use case? It can probably be solved via:

  • having a similar class to .hack but that applies your other style onwards
  • using an iframe
  • setting .hack on sibling elements but not on a parent element.

@ghost
Copy link

ghost commented Nov 27, 2016

The tricky part is adding the prefixes to the selectors equals more bytes down the wire, and I personally have been enjoying the minimalism of theme and ease of use as it stands.

It may be worth considering (haven't looked over yet, sorry) CSS namespaces if it meets the general need and helps facilitate component-based development (a la React and Vue) and allow finer control without increasing the amount of markup significantly.

I've been very pleased with Hack in current form, especially paired with the Bytesize icons @egoist suggested trying. And it's nice to see this discussion happening.

@toh82
Copy link

toh82 commented Jan 23, 2017

I got the Idea behind and there are some reasons, why it would be smart, but I don't think it's practical, to use a hack- prefix at every class. I would not care about the extra bytes because, like BEM syntax, gzip can handle that without a big impact (if I remember correctly).

@ghost
Copy link

ghost commented Mar 27, 2018

Cross-linking for continuity #61

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

No branches or pull requests

3 participants