Skip to content
This repository was archived by the owner on Aug 14, 2025. It is now read-only.

Consider changing the way using hack #44

Open

Description

@egoist

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>

Activity

  1. changed the title [-]Consider change the way using hack[/-] [+]Consider changing the way using hack[/+] on Oct 5, 2016
  2. dasilvacontin commented on Nov 26, 2016

    @dasilvacontin

    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.
  3. toh82 commented on Jan 23, 2017

    @toh82

    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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions