graphery stylent css

version 1.1.1

stylent css provides minimal style configuration for a quick and clean starting point. It is specially designed for better performance and higher productivity with fewer properties to result in cleaner code. It is small, powerful, elegant, and fully configurable via CSS variables.

Intuitive

Including stylent css in your HTML will automatically give an elegant style to all elements. No need to learn complicated and confusing CSS classes. It is all simple and intuitive.

Lightweight

stylent css includes all the features you need, including grid, styles for all elements, utility class, dark mode support, keeping everything with a minimal footprint.

Customizable

stylent css allows complete configuration and theming using CSS variables. The default style is beautiful, but you can quickly adapt it to your flavors and needs with our theme editor.

Getting Started

You simply add the main stylent css file in the header of your HTML project, that's all!

Also, you can install it locally with NPM:

npm i @graphery/stylent.css

Desktop and mobile

stylent css is wholly prepared for work perfectly in desktop, tablet, or mobile environments. Each element adjusts its characteristics for the best style in every size. For example, when a screen width of less 768px, default font is reduced to 14px, and all headers are reduced in size.

Browser support

stylent css works perfectly in all modern browsers, but does not work in older browsers that do not have support for CSS Variables. Check the CSS Variables support in caniuse.com.

Table of content

Typography

The typography has font-size defined in 16px and line-height in 1.5em. stylent css uses the font-family by operative system:

Heading h1

Heading h2

Heading h3

Heading h4

Heading h5
Heading h6

Regular text

Heading h1

Heading h2

Heading h3

Heading h4

Heading h5
Heading h6

Regular Text

Blockquotes

The Blockquote represents a section that is quoted from another source.

stylent css is amazing.

stylent css is amazing.

Lists

The List is a very versatile and common way to display items. stylent css has three types of lists: The unordered list use ul element will be marked with an outline circles, the ordered list use ol element and your items will be marked with numbers, the description list use dl element and your items will not be marking, only spacings.

Unordered list
  • item 1
  • item 2
Ordered list
  1. item 1
  2. item 2
Description list
item 1
item 1.1
Unordered list
  • item 1
  • item 2
Ordered list
  1. item 1
  2. item 2
Description list
item 1
item 1.1

Image

The Images don't have special style, only we remove the border when is included into an anchor, and the vertical-align is defined as `bottom`.

This is an inline image image

This is an inline image image

Code

The Code element represents a fragment of computer code. Just wrap anything in a code and it will appear like this. if you need a block, by default, enter the code within the pre element.

.class {
  color: #9b4dca;
}
<pre><code lang="css">.class {
  color: #9b4dca;
}</code></pre>

Box

You can define a box with the class .box

Message in a box
Message in a box

Buttons

The Button, an essential part of any user experience. Buttons come in three basic styles in stylent css: The button element has flat color by default, whereas .outline has a simple outline around.

Default Button (a class="button")

Forms

stylent css helps to define forms that work perfectly on desktop and mobile in an easy way and with a design focused on user experience.

Example
Example

All form elements

Check how is displayed every form element with stylent css:

typecodeexample
button<input type="button">
checkbox<input type="checkbox">
color<input type="color">
date<input type="date">
datetime<input type="datetime-local">
email<input type="email">
file<input type="file">
hidden<input type="hidden">
image<input type="image" src="">
month<input type="month">
number<input type="number">
password<input type="password">
radio<input type="radio">
range<input type="range">
reset<input type="reset">
search<input type="search">
submit<input type="submit">
tel<input type="tel">
text<input type="text">
time<input type="time">
url<input type="url">
week<input type="week">
select<select><option>one</option><option>two</option></select>
textarea<textarea"></textarea">

Multi field per row

You can combine forms element and grid for define multiple fields per row.


Tables

The Table element represents data in two dimensions. stylent css displays an elegant table with thead and tbody estructure.

Fist nameLast nameAgeLocation
JaneDoe27Los Angeles, CA
John Thompson25Los Angeles, CA
Fist nameLast nameAgeLocation
JaneDoe27Los Angeles, CA
John Thompson25Los Angeles, CA

Semantic blocks

The Block Semantic Tags allow you to structure HTML content in an orderly and well-defined manner. stylent css defines styles for header, main, andfooter with a maximum width of 960px, reducing their width when the screen is less than that value. Also, you can use the section orarticle tags to define isolated parts of your HTML.

Main, section and other semantic tags

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas dictum felis ac purus malesuada rutrum. Aliquam cursus eget nisl non finibus. Fusce accumsan metus sit amet enim lobortis placerat. Sed volutpat diam eu bibendum euismod. Cras sit amet tortor sed dolor euismod scelerisque.

As example, this document uses this kind of tag.

Grids

The Grid Layout is a two-dimensional grid-based layout system. With stylent css you only must be include a .rom and every .col classes. Alternativatly you can use .col-1 to .col-12 for defines the column relative size.

.col
.col
.col
.col
.col-2
.col-10

.col
.col
.col
.col
.col-2
.col-10

By default, the columns of the grid have no space between them, but you can use the .gutter class to add space between columns.

.col
.col
.col
.col
.col-2
.col-10

.col
.col
.col
.col
.col-2
.col-10

Dark mode

Dark mode has gone mainstream and Apple, Microsoft and Google have added dark mode to their operating systems. That's why stylent css includes an automatic dark mode style. You don't need to do anything.

If you want to set the dark mode on your page regardless of the operating system, you can use the .dark auxiliary style, usually in the <body> tag.

Conversely, if you want to set the light mode on your page regardless of the operating system, you can use the .light auxiliary style, usually in the <body> tag.

Your operating system is in
ClassDescription
.darkforce the dark mode
.lightforce the light mode

Auxiliary Classes

stylent css provides others useful basic classes to speed up development.

Hidden

ClassDescription
.hiddenhide the element

Text align

ClassDescription
.text-leftleft align text
.text-centercenter align text
.text-rightright align text

Left

Center

Right

Left

Center

Right

Element distribution (flex)

ClassDescription
.justify-startdefines content to the left
.justify-centerdefines content to the center
.justify-enddefines content to the right
.justify-distributeddefine content distributed
.align-startvertical align content to the top
.align-centervertical align content to the center
.align-endvertical align content to the bottom
.direction-verticaldistribute content as the column
.direction-horizontaldistribute content as the row
.centercenter the element

justify-start

justify-center

justify-end

align-start

align-center

align-end

direction-horizontal

direction-horizontal

direction-vertical

direction-verticall

center

Element size

ClassDescription
.size-full-heightdefines element height as 100%
.size-full-widthdefines element width as 100%
.size-fulldefines element height and width as 100%

Selection

ClassDescription
.not-selectableThis text is not selectable by the user

Wrap

ClassDescription
.no-wrapSuppresses line breaks

Customization and Theming

You can define our own style with a few of CSS custom variables. If you change the initial values, you can define a custom theme for stylent css. You can create your own style and see the result directly with our

interactive theme editor

Of course, if you prefer to work directly by code, this is the list of available CSS custom variables and its initial values:

Variable Default value
--st-link-hover-style underline solid var(--st-fore-color);
--st-font-family -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
--st-font-family-mono "Consolas", "Monaco", "Menlo", monospace;
--st-font-weight 400;
--st-font-bold-weight 500;
--st-font-size-xs 0.8em;
--st-font-size-s 0.9em;
--st-font-size 15px;
--st-font-size-l 1.15em;
--st-font-size-xl 1.30em;
--st-font-size-xxl 1.60em;
--st-font-size-xxxl 2.00em;
--st-font-size-xxxxl 2.30em;
--st-line-height 1.6em;
--st-line-height-l 2em;
--st-color-0 #fafafa;
--st-color-1 #f5f5f5;
--st-color-2 #e5e5e5;
--st-color-3 #d4d4d4;
--st-color-4 #a3a3a3;
--st-color-5 #737373;
--st-color-6 #525252;
--st-color-7 #404040;
--st-color-8 #262626;
--st-color-9 #171717;
--st-fore-color var(--st-color-9);
--st-bg-color var(--st-color-0);
--st-fore-color-alt var(--st-color-3);
--st-bg-color-alt var(--st-color-9);
--st-fore-color-code var(--st-color-9);
--st-bg-color-code var(--st-color-2);
--st-focus-border-color var(--st-color-7);
--st-border-color var(--st-color-4);
--st-fore-color-dark var(--st-color-0);
--st-bg-color-dark var(--st-color-9);
--st-fore-color-alt-dark var(--st-color-9);
--st-bg-color-alt-dark var(--st-color-3);
--st-border-width 1px;
--st-border-radius 2px;
--st-space 0.5em;
--st-space-after var(--st-space);
--st-space-before calc(var(--st-space) * 2);
--st-gutter calc(var(--st-space) * 3)";
--st-link-style underline dotted var(--st-color-4);
--st-link-hover-style underline solid var(--st-fore-color);