Skip to content

Graceful fallback when JavaScript not available #541

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

Open
adrianth opened this issue Feb 10, 2020 · 1 comment
Open

Graceful fallback when JavaScript not available #541

adrianth opened this issue Feb 10, 2020 · 1 comment

Comments

@adrianth
Copy link

Would it be possible to make it so that, when JavaScript is not available, the elements are shown as they would normally be if no animation was applied to them? If possible to add without introducing a breaking change, I believe it would be a very welcome improvement. We take JavaScript for granted today, but I also know people that keep it disabled by default and only enable it for trusted domains.

@magicalbrad
Copy link

FWIW, here's how I'm handling noJS. My site uses the convention of setting "js" or "no-js" on the html root. I use the following css to make sure everything shows without JS:

html.no-js [data-aos] {
opacity: 1;
transform: none;
}

The "html" tag is explicitly referenced to provide sufficient specificity to override the default properties. You could need to override other properties for some animations, but this works for the ones I'm using.

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

2 participants