Skip to content

Support .layout-simple class for arbitrary element #35

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
alex-at-dev opened this issue Jun 14, 2024 · 1 comment · Fixed by #40
Closed

Support .layout-simple class for arbitrary element #35

alex-at-dev opened this issue Jun 14, 2024 · 1 comment · Fixed by #40

Comments

@alex-at-dev
Copy link

I'd like to use matcha.css for a React app. Usually React-apps are bootstrapped inside a root HTML element that's not the body, which leads to .layout-simple not working.

The basic HTML structure of a React app usually looks more or less like this:

<html>
  <head>...</head>
  <body>
    <div id="root">
      <!-- React app renders here. -->
    </div>
    <script src="/main.js"></script>
  </body>
</html>

Rendering without a wrapping <div> is strongly discouraged, as third-party libs, extensions or tools may add / change direct children of <body>.

My suggested solution: Changing all body.layout-simple selectors to .layout-simple.

Would this be an option? Or is there a deliberate reason to use body.layout-simple?

@lowlighter
Copy link
Owner

Hi !

Yes indeed there's no special reason to enforce it on the body I think.
I'll look into it 👍

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

Successfully merging a pull request may close this issue.

2 participants