From a7108915e2f925eb7bd5d8cbc731ce799a478766 Mon Sep 17 00:00:00 2001 From: "louismaxime.piton" Date: Thu, 1 Aug 2024 09:41:54 +0200 Subject: [PATCH] Docs: add 'Utilities > Float' page --- 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 6a169f81e0..0b7126e6e7 100644 --- a/site/data/sidebar.yml +++ b/site/data/sidebar.yml @@ -224,7 +224,6 @@ draft: true - title: Flex - title: Float - draft: true - title: Interactions draft: true - title: Link