Skip to content

Commit

Permalink
docs: revert doc for hide
Browse files Browse the repository at this point in the history
[skip travis-ci]
  • Loading branch information
mnater committed Sep 13, 2021
1 parent 980fea9 commit b0b5fe5
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions docs/Setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -189,8 +189,8 @@ Words that contain a hyphen when unhyphenated should not be entered in the list.

### hide
````
type: number (0 | 1 | 2)
default: 0
type: string ("all" | "element" | "text")
default: "all
````
Define if and how elements are made invisible while being hyphenated.
````html
Expand All @@ -199,16 +199,16 @@ var Hyphenopoly = {
require: {...},
paths: {...},
setup: {
hide: 1
hide: "element"
}
};
</script>
````
To prevent a flash of unhyphenated content (FOUHC) Hyphenopoly hides the elements being hyphenated. Depending on the structure of your page this can lead to visual flicker. You can change the way Hyphenopoly hides the content:

- `0` hides the whole page by inserting the following CSS-rule `html {visibility: hidden !important}`
- `1` hides the selected elements by inserting the following CSS-rule for each selector: `<selector> {visibility: hidden !important}`
- `2` hides only the text of the selected elements by inserting the following CSS-rule for each selector: `<selector> {color: transparent !important}`
- `all` hides the whole page by inserting the following CSS-rule `html {visibility: hidden !important}`
- `element` hides the selected elements by inserting the following CSS-rule for each selector: `<selector> {visibility: hidden !important}`
- `text` hides only the text of the selected elements by inserting the following CSS-rule for each selector: `<selector> {color: transparent !important}`
- any other keyword prevents hiding.

These CSS-rules are removed, when Hyphenopoly has finished its job or when the [timeout](#timeout) gets fired.
Expand Down

0 comments on commit b0b5fe5

Please sign in to comment.