.cell
A Sass library for programmatic rythm and some candies on top of Foundation for Sites version 6.3.x or better.
Responsive rhythm for your spaces and texts
Enforce your color policy from settings
Faster prototyping
We recommend you to use it as an imported library from your Sass compiler and avoid to include it inside your project Sass sources.
Once library is available with your compiler, import it in your sources:
@import "settings";
@import "foundation";
@import "sveetoy";
Alike with Foundation, you must load the settings first then libraries. In your settings you can define both Foundation and Sveetoy settings or you may split them in two or more settings files. Sveetoy allways come after Foundation since it relies on some of its mixins and settings.
sveetoy/_f6_settings.scss
contains a sample setting file you may include in at end of your main settings file and adjust to your needs. Be aware that some of its values are linked to some Foundation setting values.
Once installed with sample settings it would add CSS styles for around 7Ko. Adding more items to color schemes and space schemes will grow up your CSS file a little bit.
Optionally you can watch about PyCssStyleguide to build a styleguide for Sveetoy components. A Sass source for CSS manifest is available which contains references about every components.
Components features share the same vocabulary depending of feature kind.
The following vocabulary kinds are listing every word from lesser value to higher.
Sveetoy enforce color policy by defining every color stuff in color schemes so they are usable in other components like blocks, boxes, buttons, etc..
There is also a basic component that just generate helper class like .bg-NAME
where NAME
is the color scheme name. These classes are only created for color scheme with a background
property.
You can find every available color scheme property from color scheme model documentation.
Colors you will see in this page is just a demonstration, Sveetoy default settings has no color scheme defined and sample settings only define a black and a white color schemes.
Note than transparent
is a reserved keyword than you should not use to define your color scheme names. Commonly this word is used as a feature in some component to avoid using any color and just inherit from parent rules.
$include-sv-colors: false;
sveetoy/components/_colors.scss
.bg-white :
#ffffff
.bg-black :
#000000
.bg-lightskyblue :
#87cefa
.bg-snow1 :
#fffafa
This component adds some minor things to the Foundation typography stuff.
Also there is a new rule that prevent paragraphs to have a bottom margin if they are the last child of their parent.
$include-sv-typography: false;
sveetoy/components/_type.scss
Title styles are not anymore sticked to hX
elements, now you can use them by the way of .title-X
classes on any other element to preserve semantic. You may even use a .title-X
class on hX
element.
.title-1
.title-2
.title-3
.title-4
.title-5
.title-6
Text colors are available for every color defined in map $sv-color-text-palette
. Properties are defined using !important
flag so take care of their usage.
.text-white
.text-black
.text-gray25
.text-gray82
.text-gray88
.text-lightskyblue
.text-deepskyblue4
Two more font thickness are available if their corresponding variable is defined:
$global-weight-thin
for thinest thickness;$global-weight-strong
for strongest thickness..text-thin
.text-normal
<b>, .text-bold
<strong>, .text-strong
Add some size possibilities to <small>
element. .medium
is equivalent to the default <small>
behavior. Available sizes are built from $sv-smalls
.
.small
Magna porttitor morbi primis mus erat torquent, turpis fusce curae ut tortor varius fringilla, et.
.big
Litora metus aliquam velit dictumst, lobortis orci penatibus odio adipiscing, orci pulvinar habitant aptent cras.
.large
Eget sed amet dolor at vehicula cubilia, nibh sollicitudin parturient vivamus sed et, rutrum fusce.
Dictumst adipiscing tempus purus libero, pharetra sapien consequat diam potenti, convallis adipiscing varius purus sapien.
.text-upper
enables you to correctly write your texts in lowercase but render them as uppercase. .text-important
just define the underline value for text-decoration
property.
.text-upper
.text-important
Various underline positions, thickness and widths. All of them are implemented with border properties on a pseudo-element :after
.
Built from list $sv-underline-widths
.
.underline.tiny
.underline.short
.underline.normal
.underline.large
.underline.full
Built from map $sv-underline-thickness
.
.underline.thin
.underline.normal
.underline.bold
Built from list $sv-underline-distances
.
.underline.sticked
.underline.near
.underline.default
.underline.far
No variable is used to build this single feature.
.underline.normal
.underline.text-center
Built from list $sv-underline-colors
.
.underline
.underline.white
.underline.black
.underline.gray25
.underline.gray82
.underline.gray88
.underline.lightskyblue
.underline.deepskyblue4
Various horizontal rule positions, thickness and widths. Following the same scheme formats than .underline
features.
Built from map $sv-hr-thickness
.
hr.thin
hr.normal
hr.bold
Built from list $sv-hr-distances
.
Built from list $sv-hr-colors
.
hr
hr.white
hr.black
hr.gray25
hr.gray82
hr.gray88
hr.lightskyblue
hr.deepskyblue4
This component create some class helpers to apply paddings or margins using space rythmic
defined in map $sv-spaces
. All of these classes use the !important
.
There are many space sizes available and each of them have their own breakpoint sizes.
$include-sv-spaces: false;
$sv-spaces
sveetoy/components/_spaces.scss
$sv-spaces-helpers-important: false;
.v-space-tiny
.v-space-short
.v-space-normal
.v-space-large
.v-space-wide
.v-space-normal.top-only
.v-space-normal.bottom-only
.h-space-tiny
.h-space-short
.h-space-normal
.h-space-large
.h-space-wide
.h-space-normal.left-only
.h-space-normal.right-only
A block is a full width container useful for fluid design layouts but with first goal to set background and font colors.
Available features can apply various vertical padding using rythmic space from $sv-spaces
and various color schemes from $sv-colors-schemes
.
This component does not apply border properties and 'hover' prefix for color scheme properties.
See Box component for available spacing features.
$include-sv-blocks: false;
sveetoy/components/_blocks.scss
Suspendisse bold mauris, auctor strong pretium ac, italic eu mauris. Donec in emphased tortor. Duis small orci sit amet justo a link vestibulum. Vivamus commodo some code
arcu elit.
Quisque praesent ut egestas vivamus urna ad pellentesque, inceptos sociis non nam, nullam nisi adipiscing rutrum congue curabitur, cras bibendum posuere ullamcorper. Lobortis tempus erat leo cubilia, lacus viverra cum ante mauris egestas mus, ligula vehicula senectus ullamcorper vel.
Sem aliquet feugiat dui et eget eu nulla, nostra vel elit sit aenean eleifend, eros ut neque facilisis, pharetra nulla integer. Velit conubia.
#ffffff
Suspendisse bold mauris, auctor strong pretium ac, italic eu mauris. Donec in emphased tortor. Duis small orci sit amet justo a link vestibulum. Vivamus commodo some code
arcu elit.
Torquent nonummy fermentum imperdiet id justo duis, congue nisl dictum imperdiet, venenatis neque quam urna leo, auctor quisque tellus cras hendrerit.
Consequat maecenas nisl inceptos posuere facilisis velit, purus quam mauris accumsan dui mollis, suscipit a ac praesent faucibus auctor duis, tincidunt ornare feugiat. Sagittis ut non scelerisque sapien nascetur ultrices venenatis, dui dignissim.
#000000
Suspendisse bold mauris, auctor strong pretium ac, italic eu mauris. Donec in emphased tortor. Duis small orci sit amet justo a link vestibulum. Vivamus commodo some code
arcu elit.
Purus dolor fringilla nunc primis dolor tortor odio, in vestibulum aliquam malesuada quam, facilisi pulvinar molestie egestas, torquent parturient consectetuer.
Varius molestie ut lectus a eleifend ad, litora est dapibus risus semper, ipsum aliquet ac euismod litora etiam congue eget,.
#87cefa
Suspendisse bold mauris, auctor strong pretium ac, italic eu mauris. Donec in emphased tortor. Duis small orci sit amet justo a link vestibulum. Vivamus commodo some code
arcu elit.
Viverra lacinia accumsan fames leo suspendisse porta, odio nostra pede integer scelerisque volutpat, posuere habitasse ligula diam. Ridiculus molestie lacinia vehicula commodo vehicula, euismod orci ad litora et, ut feugiat augue integer cursus. Sem.
In eleifend rutrum a facilisi quam, sapien leo morbi etiam, magna auctor conubia mauris pharetra, rutrum torquent venenatis netus. Feugiat cras morbi est ullamcorper augue, bibendum mi faucibus.
#fffafa
Suspendisse bold mauris, auctor strong pretium ac, italic eu mauris. Donec in emphased tortor. Duis small orci sit amet justo a link vestibulum. Vivamus commodo some code
arcu elit.
Egestas metus commodo nostra eu lacinia facilisi per, potenti nulla vestibulum molestie auctor, natoque venenatis class fusce, eu. Aliquam nostra venenatis sodales ornare, pretium libero duis magnis viverra, vehicula felis.
Commodo habitant sagittis molestie laoreet turpis egestas suscipit, hac a aenean conubia cras ut, condimentum urna primis porttitor. Rhoncus vitae duis fermentum, dolor gravida posuere tristique ligula, pulvinar dignissim mollis conubia, litora montes viverra rutrum vehicula, curabitur tempus molestie conubia, praesent congue. Cursus malesuada tellus nisi, pharetra.
#87cefa
Suspendisse bold mauris, auctor strong pretium ac, italic eu mauris. Donec in emphased tortor. Duis small orci sit amet justo a link vestibulum. Vivamus commodo some code
arcu elit.
Augue neque pharetra porta viverra egestas, volutpat odio commodo nisi sit, cursus odio rhoncus elementum augue, varius feugiat ullamcorper ante consequat porttitor,. Tempor.
Ipsum dis magna tempor dolor congue, sapien vel libero montes fusce hac scelerisque proin, dictumst lacus. Sem potenti molestie ad inceptos hendrerit, rhoncus etiam vestibulum.
#fffafa
Suspendisse bold mauris, auctor strong pretium ac, italic eu mauris. Donec in emphased tortor. Duis small orci sit amet justo a link vestibulum. Vivamus commodo some code
arcu elit.
Pede pretium at orci eros odio, tortor massa venenatis tincidunt, justo iaculis sociosqu iaculis ridiculus, parturient sollicitudin pellentesque. Ridiculus lobortis pharetra potenti, libero lacinia sociis phasellus, pretium torquent eros sociis praesent, risus ipsum inceptos facilisi leo. Hendrerit pharetra nibh netus, tristique a cubilia cursus mus lacus, fusce pretium.
Vestibulum venenatis curae pretium enim purus, habitant ut facilisi vestibulum pede, molestie sit mauris at, luctus blandit dictum aenean. Sed pellentesque nisi accumsan convallis aptent eros, class habitasse libero hendrerit habitasse rutrum sollicitudin magnis, congue molestie gravida eros cursus, placerat senectus cras. Semper id dis justo dui.
You can delegate spacing behavior to a .inner
in a .block.delegate
, the latter will only retains the color features.
Suspendisse bold mauris, auctor strong pretium ac, italic eu mauris. Donec in emphased tortor. Duis small orci sit amet justo a link vestibulum. Vivamus commodo some code
arcu elit.
Donec cras id sed magnis aptent semper, orci pretium vehicula facilisis, vitae arcu phasellus condimentum cursus vivamus enim, nullam odio ornare. Pede pharetra viverra.
Laoreet sed facilisis nec varius tempor at, vulputate in varius neque penatibus, est quam posuere velit eu, elementum suscipit ut vulputate. Venenatis nunc.
Box component combinates spaces and colors settings alike blocks but with both horizontal and vertical padding and optional borders.
This component support 'hover' prefix for every color scheme properties that will operate on 'hover' event.
$include-sv-boxes: false;
sveetoy/components/_boxes.scss
Space features are built from $sv-spaces
(except for .unpadded
that just set padding to 0). Default box spaces comes from normal
item from $sv-spaces
.
Additionaly, to respect visual spaces, first direct child never have a margin and last direct child never have a margin bottom.
Suspendisse bold mauris, auctor strong pretium ac, italic eu mauris. Donec in emphased tortor. Duis small orci sit amet justo a link vestibulum. Vivamus commodo some code
arcu elit.
Suspendisse bold mauris, auctor strong pretium ac, italic eu mauris. Donec in emphased tortor. Duis small orci sit amet justo a link vestibulum. Vivamus commodo some code
arcu elit.
Suspendisse bold mauris, auctor strong pretium ac, italic eu mauris. Donec in emphased tortor. Duis small orci sit amet justo a link vestibulum. Vivamus commodo some code
arcu elit.
Suspendisse bold mauris, auctor strong pretium ac, italic eu mauris. Donec in emphased tortor. Duis small orci sit amet justo a link vestibulum. Vivamus commodo some code
arcu elit.
Suspendisse bold mauris, auctor strong pretium ac, italic eu mauris. Donec in emphased tortor. Duis small orci sit amet justo a link vestibulum. Vivamus commodo some code
arcu elit.
Suspendisse bold mauris, auctor strong pretium ac, italic eu mauris. Donec in emphased tortor. Duis small orci sit amet justo a link vestibulum. Vivamus commodo some code
arcu elit.
Suspendisse bold mauris, auctor strong pretium ac, italic eu mauris. Donec in emphased tortor. Duis small orci sit amet justo a link vestibulum. Vivamus commodo some code
arcu elit.
Color features are built from $sv-colors-schemes
. Default box colors comes from $sv-colors-scheme-default
.
Alike Button component border and hover properties are supported.
Suspendisse bold mauris, auctor strong pretium ac, italic eu mauris. Donec in emphased tortor. Duis small orci sit amet justo a link vestibulum. Vivamus commodo some code
arcu elit.
Suspendisse bold mauris, auctor strong pretium ac, italic eu mauris. Donec in emphased tortor. Duis small orci sit amet justo a link vestibulum. Vivamus commodo some code
arcu elit.
Suspendisse bold mauris, auctor strong pretium ac, italic eu mauris. Donec in emphased tortor. Duis small orci sit amet justo a link vestibulum. Vivamus commodo some code
arcu elit.
Suspendisse bold mauris, auctor strong pretium ac, italic eu mauris. Donec in emphased tortor. Duis small orci sit amet justo a link vestibulum. Vivamus commodo some code
arcu elit.
Suspendisse bold mauris, auctor strong pretium ac, italic eu mauris. Donec in emphased tortor. Duis small orci sit amet justo a link vestibulum. Vivamus commodo some code
arcu elit.
Suspendisse bold mauris, auctor strong pretium ac, italic eu mauris. Donec in emphased tortor. Duis small orci sit amet justo a link vestibulum. Vivamus commodo some code
arcu elit.
Optionally if your color scheme support borders you can change its thickness using some features. These thickness are built from $sv-boxes-thickness
.
Suspendisse bold mauris, auctor strong pretium ac, italic eu mauris. Donec in emphased tortor. Duis small orci sit amet justo a link vestibulum. Vivamus commodo some code
arcu elit.
Suspendisse bold mauris, auctor strong pretium ac, italic eu mauris. Donec in emphased tortor. Duis small orci sit amet justo a link vestibulum. Vivamus commodo some code
arcu elit.
Suspendisse bold mauris, auctor strong pretium ac, italic eu mauris. Donec in emphased tortor. Duis small orci sit amet justo a link vestibulum. Vivamus commodo some code
arcu elit.
Color scheme is only applied to element without .transparent
feature so they can just inherit from parent properties.
Suspendisse bold mauris, auctor strong pretium ac, italic eu mauris. Donec in emphased tortor. Duis small orci sit amet justo a link vestibulum. Vivamus commodo some code
arcu elit.
Apply default box color scheme
Suspendisse bold mauris, auctor strong pretium ac, italic eu mauris. Donec in emphased tortor. Duis small orci sit amet justo a link vestibulum. Vivamus commodo some code
arcu elit.
Don't apply any color scheme
A simple flexbox grid.
Alike .row
in float grid, .flex-grid
is the main container and .cell
is equivalent to .columns
.
Available cell sizes are builded from $sv-flex-grid-sizes
list and defined for each enabled breakpoints.
.margin
feature is defined from $sv-flex-grid-gutter
.
Available cell width sizes are builded from list $sv-flex-grid-sizes
, note that size decimals are removed from the size class name so value 33.333
will build a class names like .small-33
, .medium-33
, etc..
$include-sv-flex: false;
sveetoy/components/_flex.scss
.cell
.cell.small-100.medium-20
20%
.cell.small-100.medium-25
25%
.cell.small-100.medium-33
33.3333%
.cell.small-100.medium-50
50%
.cell.small-100.medium-75
75%
.cell.small-100.medium-100
100%
.cell
.cell.small-100.medium-20
20%
.cell.small-100.medium-25
25%
.cell.small-100.medium-33
33.3333%
.cell.small-100.medium-50
50%
.cell.small-100.medium-75
75%
.cell.small-100.medium-100
100%
.v-align-start
Neque at porta commodo auctor condimentum suspendisse, elementum adipiscing primis hymenaeos litora nostra, massa quisque.
.v-align-end
Ornare amet mus adipiscing accumsan inceptos luctus lobortis, lorem integer vel fusce, odio nonummy montes.
.v-align-center
Sollicitudin aptent arcu vivamus potenti iaculis dolor vel, pulvinar cursus et nunc parturient, vitae erat.
.v-align-around
Tristique ornare ultrices metus mi, natoque interdum gravida pretium tempus, eget fames curabitur nec ad.
.v-align-between
Malesuada habitasse interdum egestas lobortis odio taciti, libero donec neque hendrerit torquent laoreet facilisi, dictum.
Every alignment classname is available for each breakpoint names, you can combine them to change alignment behavior between breakpoints.
Classnames are builded using enabled breakpoints from $sv-breakpoints
.
Start | End | Center | Around | Between | |
---|---|---|---|---|---|
.v-align-start | .v-align-end | .v-align-center | .v-align-around | .v-align-between | |
Small | .small-v-align-start | .small-v-align-end | .small-v-align-center | .small-v-align-around | .small-v-align-between |
Medium | .medium-v-align-start | .medium-v-align-end | .medium-v-align-center | .medium-v-align-around | .medium-v-align-between |
Large | .large-v-align-start | .large-v-align-end | .large-v-align-center | .large-v-align-around | .large-v-align-between |
Xlarge | .xlarge-v-align-start | .xlarge-v-align-end | .xlarge-v-align-center | .xlarge-v-align-around | .xlarge-v-align-between |
Xxlarge | .xxlarge-v-align-start | .xxlarge-v-align-end | .xxlarge-v-align-center | .xxlarge-v-align-around | .xxlarge-v-align-between |
Every direction classname is available for each breakpoint names, you can combine them to change direction behavior between breakpoints.
Like below with .direction-column.large-direction-row
:
Classnames are builded using enabled breakpoints from $sv-breakpoints
.
Row | Row-reverse | Column | Column-reverse | |
---|---|---|---|---|
.direction-row | .direction-row-reverse | .direction-column | .direction-column-reverse | |
Small | .small-direction-row | .small-direction-row-reverse | .small-direction-column | .small-direction-column-reverse |
Medium | .medium-direction-row | .medium-direction-row-reverse | .medium-direction-column | .medium-direction-column-reverse |
Large | .large-direction-row | .large-direction-row-reverse | .large-direction-column | .large-direction-column-reverse |
Xlarge | .xlarge-direction-row | .xlarge-direction-row-reverse | .xlarge-direction-column | .xlarge-direction-column-reverse |
Xxlarge | .xxlarge-direction-row | .xxlarge-direction-row-reverse | .xxlarge-direction-column | .xxlarge-direction-column-reverse |