folk.zone Wiki

a public knowledge base

Site Tools


indieweb:progressive_enhancement

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

indieweb:progressive_enhancement [2026/09/23 14:52] – created - external edit 127.0.0.1indieweb:progressive_enhancement [2026/10/23 14:54] (current) – external edit 127.0.0.1
Line 30: Line 30:
  
 <code javascript> <code javascript>
-// First script to run — removes the class if JS is available+// First script to run: removes the class if JS is available
 document.documentElement.classList.remove('no-js'); document.documentElement.classList.remove('no-js');
 </code> </code>
Line 36: Line 36:
 This creates two automatic states: This creates two automatic states:
   * **JS on:** ''.no-js'' is removed, everything works normally   * **JS on:** ''.no-js'' is removed, everything works normally
-  * **JS off:** ''.no-js'' stays — use it to style accordingly+  * **JS off:** ''.no-js'' stays: use it to style accordingly
  
 ===== Hiding JS-Dependent Elements ===== ===== Hiding JS-Dependent Elements =====
Line 58: Line 58:
 ===== Explaining, Not Just Hiding ===== ===== Explaining, Not Just Hiding =====
  
-Hiding broken elements isn't enough — explain what's happening:+Hiding broken elements isn't enough: explain what's happening:
  
 <code css> <code css>
Line 111: Line 111:
   * A statement that the user's choice is respected   * A statement that the user's choice is respected
  
-This is a resource for informed decision-making — which is the user's right.+This is a resource for informed decision-making: which is the user's right.
  
 ===== See Also ===== ===== See Also =====
indieweb/progressive_enhancement.1790196766.txt.gz · Last modified: by 127.0.0.1