From 65c64285d7a58d507b1be58f08bd7e3eb6d813b5 Mon Sep 17 00:00:00 2001 From: Louis-Maxime Piton Date: Fri, 2 Aug 2024 13:38:40 +0200 Subject: [PATCH] docs(utilities): add 'Float' page (#2661) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Julien Déramond --- site/content/docs/0.0/utilities/float.md | 44 +++++++++++++++++++++++- site/data/sidebar.yml | 1 - 2 files changed, 43 insertions(+), 2 deletions(-) diff --git a/site/content/docs/0.0/utilities/float.md b/site/content/docs/0.0/utilities/float.md index e2e0ff7679..f0fa668928 100644 --- a/site/content/docs/0.0/utilities/float.md +++ b/site/content/docs/0.0/utilities/float.md @@ -8,4 +8,46 @@ aliases: toc: true --- -{{< callout-soon "page" >}} +## Overview + +These utility classes float an element to the left or right, or disable floating, based on the current viewport size using the [CSS `float` property](https://developer.mozilla.org/en-US/docs/Web/CSS/float). `!important` is included to avoid specificity issues. These use the same viewport breakpoints as our grid system. Please be aware float utilities have no effect on flex items. + +{{< example >}} +
Float start on all viewport sizes

+
Float end on all viewport sizes

+
Don't float on all viewport sizes
+{{< /example >}} + + + + + +## CSS + +### Sass utilities API + +Float utilities are declared in our utilities API in `scss/_utilities.scss`. [Learn how to use the utilities API.]({{< docsref "/utilities/api#using-the-api" >}}) + +{{< scss-docs name="utils-float" file="scss/_utilities.scss" >}} diff --git a/site/data/sidebar.yml b/site/data/sidebar.yml index df07adef22..d94838a966 100644 --- a/site/data/sidebar.yml +++ b/site/data/sidebar.yml @@ -223,7 +223,6 @@ draft: true - title: Flex - title: Float - draft: true - title: Interactions - title: Link draft: true