]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
Change deprecated html tags to text decoration classes (#29604)
authorMatthieu Vignolle <vignolle.matthieu@gmail.com>
Wed, 27 Nov 2019 06:43:49 +0000 (07:43 +0100)
committerXhmikosR <xhmikosr@gmail.com>
Wed, 27 Nov 2019 06:43:49 +0000 (08:43 +0200)
scss/_utilities.scss
site/content/docs/4.3/content/typography.md
site/content/docs/4.3/utilities/text.md

index 1f3c7b4ac2a16b1c4bf4c14ab5ac450811ec300c..b7c38249aa96b687e128dcf5a40809046af86683 100644 (file)
@@ -426,7 +426,7 @@ $utilities: map-merge(
     ),
     "text-decoration": (
       property: text-decoration,
-      values: none
+      values: none underline line-through
     ),
     "font-style": (
       property: font-style,
index d4daabdd033f20d4d209c82f8c95e5fea4fff52a..5b651660988c1557621062eac57aba21f466c0d7 100644 (file)
@@ -143,13 +143,25 @@ Styling for common inline HTML5 elements.
 <p><em>This line rendered as italicized text.</em></p>
 {{< /example >}}
 
-`.mark` and `.small` classes are also available to apply the same styles as `<mark>` and `<small>` while avoiding any unwanted semantic implications that the tags would bring.
+Beware that those tags should be used for semantic purpose:
 
-While not shown above, feel free to use `<b>` and `<i>` in HTML5. `<b>` is meant to highlight words or phrases without conveying additional importance while `<i>` is mostly for voice, technical terms, etc.
+* `<mark>` represents text which is marked or highlighted for reference or notation purposes.
+* `<small>` represents side-comments and small print, like copyright and legal text.
+* `<s>` represents element that are no longer relevant or no longer accurate.
+* `<u>` represents a span of inline text which should be rendered in a way that indicates that it has a non-textual annotation.
+
+If you want to style your text, you should use the following classes instead:
+
+* `.mark` will apply the same styles as `<mark>`.
+* `.small` will apply the same styles as `<small>`.
+* `.text-decoration-underline` will apply the same styles as `<u>`.
+* `.text-decoration-line-through` will apply the same styles as `<s>`.
+
+While not shown above, feel free to use `<b>` and `<i>` in HTML5. `<b>` is meant to highlight words or phrases without conveying additional importance, while `<i>` is mostly for voice, technical terms, etc.
 
 ## Text utilities
 
-Change text alignment, transform, style, weight, line-height and color with our [text utilities]({{< docsref "/utilities/text" >}}) and [color utilities]({{< docsref "/utilities/colors" >}}).
+Change text alignment, transform, style, weight, line-height, decoration and color with our [text utilities]({{< docsref "/utilities/text" >}}) and [color utilities]({{< docsref "/utilities/colors" >}}).
 
 ## Abbreviations
 
index 3ae40fabc97089d42e819090a252ec0770297862..f54020644cdd12b95f37dc426335f3f09fc82fcb 100644 (file)
@@ -109,8 +109,10 @@ Reset a text or link's color with `.text-reset`, so that it inherits the color f
 
 ## Text decoration
 
-Remove a text decoration with a `.text-decoration-none` class.
+Decorate text in components with text decoration classes.
 
 {{< example >}}
-<a href="#" class="text-decoration-none">Non-underlined link</a>
+<p class="text-decoration-underline">This text has a line underneath it.</p>
+<p class="text-decoration-line-through">This text has a line going through it.</p>
+<a href="#" class="text-decoration-none">This link has its text decoration removed</a>
 {{< /example >}}