From 7a694396c1efdc70872968b0cae311c5b373ae68 Mon Sep 17 00:00:00 2001 From: Jens Luyten Date: Fri, 14 Feb 2020 08:24:16 +0100 Subject: [PATCH] Add utility class for the user-select property (#30035) * Add utility class for the user-select property * Docs: Add new page for behavior utility classes - includes user select utility * Update and rename behaviors.md to interactions.md * Update sidebar.yml Co-authored-by: Mark Otto Co-authored-by: XhmikosR Co-authored-by: Martijn Cuppens --- scss/_utilities.scss | 4 ++++ site/content/docs/4.3/utilities/interactions.md | 17 +++++++++++++++++ site/data/sidebar.yml | 1 + 3 files changed, 22 insertions(+) create mode 100644 site/content/docs/4.3/utilities/interactions.md diff --git a/scss/_utilities.scss b/scss/_utilities.scss index 60ac6dac27..dc3bd7238b 100644 --- a/scss/_utilities.scss +++ b/scss/_utilities.scss @@ -443,6 +443,10 @@ $utilities: map-merge( class: font, values: (monospace: $font-family-monospace) ), + "user-select": ( + property: user-select, + values: all auto none + ), "rounded": ( property: border-radius, class: rounded, diff --git a/site/content/docs/4.3/utilities/interactions.md b/site/content/docs/4.3/utilities/interactions.md new file mode 100644 index 0000000000..13ca4ef90e --- /dev/null +++ b/site/content/docs/4.3/utilities/interactions.md @@ -0,0 +1,17 @@ +--- +layout: docs +title: Interactions +description: Utility classes that change how users interact with contents of a website. +group: utilities +toc: false +--- + +## Text selection + +Change the way in which the content is selected when the user interacts with it. + +{{< example >}} +

This paragraph will be entirely selected when clicked by the user.

+

This paragraph has default select behavior.

+

This paragraph will not be selectable when clicked by the user.

+{{< /example >}} diff --git a/site/data/sidebar.yml b/site/data/sidebar.yml index dd6a3676ac..c1f9e3cc9f 100644 --- a/site/data/sidebar.yml +++ b/site/data/sidebar.yml @@ -80,6 +80,7 @@ - title: Display - title: Flex - title: Float + - title: Interactions - title: Overflow - title: Position - title: Shadows