Skip to main content

Helpers

SACSS does not cover all styles, the following four projects commonly used styles, SACSS provides the corresponding Mixin for the convenience of users.

Here it is recommended to use function-based semantic names, so there is no SACSS naming convention here.

NameFunction
ClearfixClears floats of floats
Ellipsissingle line of text beyond the display of ...
Ellipsis-multiplemulti-line text out of display ...
CellFill the remaining space in the floating layout

Note that when you have a uniform naming prefix, it is recommended to add the uniform prefix to the code here as well.

Use#

Life was like a box of chocolates. You never know what you're going to get.
Life was like a box of chocolates. You never know what you're going to get. Life was like a box of chocolates. You never know what you're going to get.
Float-left
Life was like a box of chocolates. You never know what you're going to get.
@import 'sacss/less/Helpers';
.clearfix{ #Clearfix; }
.ellipsis{ #Ellipsis; }
.cell{ #Cell; }
.ellipsis-mul{ #Ellipsis-multiple; }
.ellipsis-mul._2{ -webkit-line-clamp: 2; }