rené.css

design for intention
and meaning

rené is a design system for styling clean, simple, lightweight interfaces. it's easy enough to quickly "get it.” no weird stuff. it is both a library and a framework. as a library, it offers ready-to-use elements and styles. as a framework, it gives a consistent and customizable structure for building and styling your apps. it is the ultimate common ground for designers and developers.

get started
with rené

rené is a straightforward yet powerful toolkit for your design and development tasks. this guide will take you through everything you need to get started, including easy steps to install, customize, and create themes. let's dive in and explore its capabilities together.

installation

install with NPM

to install NPM (Node Package Manager), you will first need to install Node.js, which includes NPM.

install Node.js
  1. go to the Node.js website and download the latest version of Node.js for your operating system.

  2. install Node.js using the downloaded installer.

  3. verify the installation by opening a terminal or command prompt and typing:

    node -v

    you should see the installed version number of Node.js.

npm install renecss
or use the CDN link

in this example, the <link> tag is placed within the <head> element to load the stylesheet from the specified URL. this will apply the styles from the stylesheet to the elements on the page, allowing you to control their appearance and layout.

<!DOCTYPE html>
<html>
  <head>
    <title>My Website</title>
    <link rel="stylesheet" href="https://unpkg.com/renecss/dist/rene.min.css" />
  </head>
  <body>
    ...
  </body>
</html>

customization

to create your own theme, copy the following code to a new theme.css file and override it with the following guidelines.

one of the cool things about rené is it already has light and dark modes. this means you can easily create designs that suit any user preference. the best part? any changes you make will reflect in both modes. so, you can focus on crafting great designs, knowing they'll shine in both light and dark settings.

:root {
  --size-base: 4px;
  --font-primary:"HelveticaNeue", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;

}

[data-theme="theme-name"] {
  --color-primary: #8080ff;
  --color-secondary: #a640ff;
  --color-primary-background: #000000;
  --color-secondary-background: #0b0b0b;
  --color-primary-foreground: #ffffff;
  --color-secondary-foreground: #f3f3f3;
  --color-positive: green;
  --color-critical: orange;
  --color-negative: red;
}

base size

rené is built with the theory of relativity in mind - the base size is used as a reference point for other font sizes on the page. the entire layout system is applied relatively across everything and everywhere from one fundamental base size.

by changing this custom property, you're relatively increasing/decreasing the sizing of your entire design system.

  --size-base: 4px;

typography

rené supports one primary font that is applied across. yet you can easily add a secondary font and use it natively as you wish.

  --font-primary:"HelveticaNeue", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;

colors

start by giving a name to your theme.

rené is built with four color groups in mind - brand colors, backgrounds/foregrounds colors, and semantic colors.

[data theme="light"] {
    --color-primary: #0000cd;
    --color-secondary: #800080;
    --color-primary-background: #ffffff;
    --color-secondary-background: #eeeeee;
    --color-tertiary-background: #dddddd;
    --color-primary-foreground: #111111;
    --color-secondary-foreground: #222222;
    --color-tertiary-foreground: #333333;
    --color-positive: darkgreen;
    --color-critical: gold;
    --color-negative: orangered;
}

styleguide

rené uses elements and class names as simple yet effective building blocks. it's about getting more done with less. it provides the essentials, helping designers and developers to create diverse designs from minimal components.

typography

rené's typography system is built around rem units. this means that all font sizes are relative to the root element. it allows for consistency in design, making it look good on all devices. also, using rem units can enhance accessibility, as it respects user preferences for default font sizes.

the following example shows how typography is used in a relative way

h1 {
    font-size: 5.28rem; /* 6rem * 0.88 */
    line-height: 0.95;
}

headings


Heading 1

Write Something

Heading 2

Write Something

Heading 3

Write Something

Heading 4

Write Something

Heading 5

Write Something

Heading 6
Write Something
Heading 6

Write Something

formatting


Bold
Strong
Write SomethingWrite Something
Blockquote
Write Something
code
Write Something
text-xs
Write Something
text-s
Write Something
text-m
Write Something
text-l
Write Something

colors

rené uses semantic colour naming. this means colours are named for their purpose, not their look. so, "error" or "error-red" could be names for colours used in messages.

this makes the stylesheet easier to understand and maintain, and reduces confusion in design.

brand


color-primary
color-secondary

background


background-primary
background-secondary
background-tertiary

foreground


foreground-primary
foreground-secondary
foreground-tertiary

semantics


background-positive
background-critical
background-negative

opacity


opacity-xl
opacity-l
opacity-m
opacity-s
opacity-xs

layout

containers


view

use 'view' when you want to fill the viewport, giving you control over the visible area.

panel

use '.panel' for wrapping related content, fostering content coherence.

page

use '.page' for structuring an entire webpage, providing a straightforward layout.

sticky

use '.sticky' to keep elements in view while scrolling, enhancing user navigation.

hidden

use '.hidden' to remove elements from the display, managing content visibility without removing them from the document flow.

.scrollable

use '.scrollable' for making overflowing content scrollable, ensuring full content accessibility.

hidden-on-mobile

use '.hidden-on-mobile' to hide certain elements on mobile view, tailoring user experience per device type.

header

use 'header' for top-level navigation and branding, offering an intuitive user interface.

nav

use 'nav' for main navigation links, directing users across the site.

footer

use 'footer' for secondary information like copyright notices, enhancing site credibility.

multipurpose box


box

use box when you want to stack items in a specific way, offering flexibility in arranging your content.

hr

use 'hr' to separate sections or elements visually, improving content readability.

fixed-size Boxes


box-xs
box-s
box-m
box-l

gaps


gap-xs
gap-s
gap-m
gap-l
gap-xl

directions


row
column

justifications


justify-end
justify-start
justify-stretch

alignments


align-start
align-end
align-center
align-stretch

paddings


padding-xs
padding-s
padding-m
padding-l
padding-xl

shadows

shadow
shadow-hover

borders

border-bottom
border

media