Clay
Skip to ContentClayClay by Liferay
  • Get Started
    • Introduction
    • What is Clay
    • Importing the JS Component
    • Using JS Components with Metal.js
    • Web Components
  • Foundations
    • Grid
    • Typography
  • Lexicon Core Components
    • Alerts
    • Badges
    • Buttons
    • Cards
    • Charts
      • Advanced Examples
        • Axis Label
        • Axis Range
        • Data Color
        • Gridlines
        • Predictive forecasting
        • Regions
        • X Axis Tick Formatting
      • Basic Examples
        • Bar Chart
        • Bubble Chart
        • Combination Chart
        • Donut Chart
        • Gauge Chart
        • Geomap Chart
        • Line Chart
        • Pie Chart
        • Scatter Chart
        • Spline Chart
        • Step Chart
    • Dataset Display
    • Dropdown Menu
    • Forms
      • Checkbox, Radio, and Toggle
      • Forms
      • Forms Hierarchy
      • Forms Navigation
      • Multi Step Form
      • Multi Step Form Simplified
      • Selectors
      • Text Input
      • Text Input Group
      • Text Input Localizable
      • Text Input Variations
    • Icons
    • Labels
    • Link
    • List
    • Loading Indicator
    • Modals
    • Navigation
      • Breadcrumbs
      • Navigation Bar
      • Vertical Navigation
    • Pagination
    • Popovers and Tooltips
    • Progress Bars
    • Sidebar
      • Info Panel
    • Stickers
    • Table
      • Inline Edit Table
      • Table
    • Tabs
    • Toolbars
      • Management Toolbar
  • CSS Framework
    • SCSS
    • Class Helpers
    • Satellite Components
      • Alerts
      • Badges
      • Button Group
      • Cards
      • Dropdown Menu
      • Forms
        • Form Elements
        • Form Elements (Input Groups)
        • Form Elements (Validation)
      • Images (Aspect Ratios)
      • Images and Thumbnails
      • Labels
      • Links
      • List Groups
      • Modals
      • Nav
      • Navigation
        • Header
      • Paginations
      • Panels
      • Popovers and Tooltips
      • Progress Bars
      • Stickers
      • Tables
      • Tbar (Toolbar)
      • Timelines
      • Toggle Switch
    • Page Examples
      • Card View Template
      • Document Upload
      • List View Template
      • Table View Template
      • Users and Organizations
  • News

Class Helpers

Autofit Row

Make content expand to fill remaining space or create equally spaced content with the .autofit-row, .autofit-col, and .autofit-col-expand classes.

.autofit-row, .autofit-col, .autofit-col-expand shouldn't be used for laying out site pages, rather it's most useful for small chunks of content inside other components (e.g. cards or list-groups).
Direct descendants of .autofit-col are flex-direction: column; (IE 10-11 workaround because they don't respect min/max width or min/max height in flex items) become block level elements by default, see https://www.w3.org/TR/css-flexbox-1/#flex-items. If you want to display content inside .autofit-col using floats, inline, or inline-block, wrap the content with ```
```
.
Alberto Calvo, modified 2 hours ago.

ReallySuperInsanelyJustIncrediblyLongAndTotallyNotPossibleWordButWeAreReallyTryingToCoverAllOurBasesHereJustInCaseSomeoneIsNutsAsPerUsual

  • Dropdown Header
  • Action 1
  • Action 2
  • Action 3
  • Action 4
  • Action 5
  • Action 6
  • Action 7
  • Action 8
Alberto Calvo, modified 2 hours ago.

ReallySuperInsanelyJustIncrediblyLongAndTotallyNotPossibleWordButWeAreReallyTryingToCoverAllOurBasesHereJustInCaseSomeoneIsNutsAsPerUsual

Approved Pending Rejected
Alberto Calvo, modified 2 hours ago.

ReallySuperInsanelyJustIncrediblyLongAndTotallyNotPossibleWordButWeAreReallyTryingToCoverAllOurBasesHereJustInCaseSomeoneIsNutsAsPerUsual

Approved Pending Rejected
Alberto Calvo, modified 2 hours ago.

ReallySuperInsanelyJustIncrediblyLongAndTotallyNotPossibleWordButWeAreReallyTryingToCoverAllOurBasesHereJustInCaseSomeoneIsNutsAsPerUsual

Approved Pending Rejected
  • Dropdown Header
  • Action 1
  • Action 2
  • Action 3
  • Action 4
  • Action 5
  • Action 6
  • Action 7
  • Action 8

ReallySuperInsanelyJustIncrediblyLongAndTotallyNotPossibleWordButWeAreReallyTryingToCoverAllOurBasesHereJustInCaseSomeoneIsNutsAsPerUsual

Sept 25 - 3 Views

Autofit Spacing

The autofit-padded class should be added to autofit-row to give padding to all autofit-cols that are direct children of autofit-row.

The autofit-padded-no-gutters-x class gives padding to all autofit-cols that are direct children of autofit-row. It has negative margins on the left and right to offset the padding (similar to Bootstrap's row class).

The autofit-padded-no-gutters-y class gives padding to all autofit-cols that are direct children of autofit-row. It has negative margins on the top and bottom to offset the padding (Generally used if nesting .autofit-row).

The autofit-padded-no-gutters class gives padding to all autofit-cols that are direct children of autofit-row. It has negative margins on the top, right, bottom, and left to offset the padding (Generally used if nesting .autofit-row).

Autofit Row Vertical Alignment

Autofit Row vertically aligns to the top by default.

The autofit-row-center class vertically aligns items in autofit-row to the middle.

The autofit-row-end class vertically aligns items in autofit-row to the bottom.

Autofit Float

The component autofit-float or .autofit-float-{sm|md}-down simulates the behavior of floated elements in .autofit-row. Items that break to a new line will be aligned to the left.

This pattern provides the benefit of aligning content via flexbox without losing the behavior of floated elements at the expense of extra markup.

ReallySuperInsanelyJustIncrediblyLongAndTotallyNotPossibleWordButWeAreReallyTryingToCoverAllOurBasesHereJustInCaseSomeoneIsNutsAsPerUsual

ReallySuperInsanelyJustIncrediblyLongAndTotallyNotPossibleWord

Autofit Float End

Mimic "right floated" elements.

The component .autofit-float-end or .autofit-float-end-{sm|md}-down simulates the behavior of "right floated" elements in .autofit-row. Items that break to a new line will be aligned right.

Aligning items to the left will require nesting autofit-float autofit-row inside an autofit-col autofit-col-expand with the use of helper classes.

ReallySuperInsanelyJustIncrediblyLongAndTotallyNotPossibleWordButWeAreReallyTryingToCoverAllOurBasesHereJustInCaseSomeoneIsNutsAsPerUsual

ReallySuperInsanelyJustIncrediblyLongAndTotallyNotPossibleWord

Nesting Autofit Rows

COMMENTS

LC
DA
David Aragones Otero
3 Hours Ago
  • Download
  • Edit
  • Move
  • Checkout
  • Permissions
  • Move to Recycle Bin

Percolator beans french press extraction seasonal grinder plunger pot caramelization. Single origin, dark grinder cultivar aftertaste iced skinny cappuccino irish barista aftertaste fair trade.Sweet, carajillo decaffeinated, french press crema froth and organic a fair trade. In est cream brewed bar roast filter americano turkish.

LC
Laura Garcia Castano
2 Hours Ago
  • Download
  • Edit
  • Move
  • Checkout
  • Permissions
  • Move to Recycle Bin

Percolator beans french press extraction seasonal grinder plunger pot caramelization. Single origin, dark grinder cultivar aftertaste iced skinny cappuccino irish barista aftertaste fair trade.Sweet, carajillo decaffeinated, french press crema froth and organic a fair trade. In est cream brewed bar roast filter americano turkish.

Inline Item

Use the inline-item inline-item-before, inline-item inline-item-middle, and inline-item inline-item-after classes to provide consistent spacing between text and icons in elements such as links or buttons. This can also be used in other components that have inline content (e.g., badge and label).

For this component to function and space properly, the white space must be removed between text and icons from the markup inside the component. It's generally easier to remove all white space inside the link, button, or component. In the examples below, whitespaces in button and link are slightly off and the link underline on hover is a bit wide.
Link without Whitespace
linkwhy, but ok.
Link with Whitespace
link
Button without Whitespace
Button with Whitespace

Close

A Button or Link for closing stuff.

Anchor

× ×

Button

Except as otherwise noted, the content of this site is licensed under CC BY-SA 4.0 license.