Remove JS-conditional classes (#3222)

* Remove no-js class

* Document alternative to no-js class
This commit is contained in:
Adam Averay
2025-03-06 15:27:11 +00:00
committed by GitHub
parent 401b4426e7
commit c37e7b7e06
4 changed files with 11 additions and 11 deletions

2
dist/index.html vendored
View File

@@ -1,5 +1,5 @@
<!doctype html>
<html class="no-js" lang="">
<html lang="">
<head>
<meta charset="utf-8">

View File

@@ -149,6 +149,13 @@ content="telephone=no">`](https://developer.apple.com/library/archive/documentat
page) by [implementing X-Robots-tag
headers](https://github.com/h5bp/html5-boilerplate/issues/804).
- Apply JavaScript-dependent CSS styles using [the `scripting` media
feature](https://developer.mozilla.org/en-US/docs/Web/CSS/@media/scripting).
Use `@media (scripting: none) { ... }` to target browsers with JavaScript
disabled, or `@media (scripting: enabled) { ... }` to target browsers with
JavaScript enabled. Using this technique also helps [avoid the
FOUC](https://www.paulirish.com/2009/avoiding-the-fouc-v3/).
## News Feeds
### RSS
@@ -251,7 +258,7 @@ Tool](https://developers.google.com/search/docs/appearance/structured-data). Als
note that this markup requires to add attributes to your top `html` tag.
```html
<html class="no-js" lang="" itemscope itemtype="https://schema.org/Article">
<html lang="" itemscope itemtype="https://schema.org/Article">
<head>
<link rel="author" href="">

View File

@@ -11,13 +11,6 @@ By default, HTML5 Boilerplate provides two `html` pages:
## `index.html`
### The `no-js` Class
The `no-js` class is provided in order to allow you to more easily and
explicitly add custom styles based on whether JavaScript is disabled (`.no-js`)
or enabled (`.js`). Using this technique also helps [avoid the
FOUC](https://www.paulirish.com/2009/avoiding-the-fouc-v3/).
### Language Attribute
Please consider specifying the language of your content by adding a
@@ -25,7 +18,7 @@ Please consider specifying the language of your content by adding a
to the `lang` attribute in the `<html>` as in this example:
```html
<html class="no-js" lang="en">
<html lang="en">
```
### The order of the `<title>` and `<meta>` tags

View File

@@ -1,5 +1,5 @@
<!doctype html>
<html class="no-js" lang="">
<html lang="">
<head>
<meta charset="utf-8">