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

Add additional css rules to address Nuxt and similar frameworks #222

Closed
djmtype opened this issue Aug 19, 2022 · 3 comments
Closed

Add additional css rules to address Nuxt and similar frameworks #222

djmtype opened this issue Aug 19, 2022 · 3 comments

Comments

@djmtype
Copy link

djmtype commented Aug 19, 2022

Nuxt v3 injects and requires a div#__nuxt added to the DOM directly following the body. The way Pico's max-width rules target head, main and footer is by using direct descenders. For example ,body > main.

Original:

@media (min-width: 768px) {
body > header,
body > main,
body > footer {
    max-width: 700px;
  }
}

While Nuxt contains this one descending div, Next contains two descending divs. To accommodate both frameworks, maybe:

@media (min-width: 768px) {
body > header, body > div[id] header,
body > main, body > div[id] main,
body > footer, body > div[id] footer {
    max-width: 700px;
  }
}
@ja1den
Copy link

ja1den commented Aug 20, 2022

This seems quite similar to my issue, #13.

@djmtype
Copy link
Author

djmtype commented Aug 20, 2022

Same issue as #13

@djmtype djmtype closed this as completed Aug 20, 2022
@nuxodin
Copy link
Contributor

nuxodin commented Aug 20, 2022

I find that too framework-specific.
But the problem exists.

I could imagine the following solution:
The good old [role="contentinfo"] is the old aria variant of "footer".
With the difference that it should only be the main footer. And that is exactly what we want.

So instead of body > footer you could use [role="contentinfo"]...
The same applies to the header: [role="banner"] instead of body > header.

The disadvantage is that you have to mark the footer with an additional (redundant?) attribute.

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