mirror of
https://github.com/h5bp/html5-boilerplate.git
synced 2026-01-07 22:04:06 -05:00
Remove JS-conditional classes (#3222)
* Remove no-js class * Document alternative to no-js class
This commit is contained in:
2
dist/index.html
vendored
2
dist/index.html
vendored
@@ -1,5 +1,5 @@
|
||||
<!doctype html>
|
||||
<html class="no-js" lang="">
|
||||
<html lang="">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
|
||||
@@ -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="">
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<!doctype html>
|
||||
<html class="no-js" lang="">
|
||||
<html lang="">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
|
||||
Reference in New Issue
Block a user