Granum

CSS micro framework.

Ultra compact set of styles and behaviours for basic web pages.

v1.2.128

3 KB minified and gzipped.
12 KB with icons and components.

Docs GitHub CDN

npm install granum

Drawer

Scroll test

More horizontal

Text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text.

More vertical

text

text

text

text

text

text

text

text

text

text

text

text

text

text

text

text

text

text

Footer

Typography

Text, links, code, quotes, lists, colors, tags, badges, bars, modifiers. Dark mode. Minimal styling.

Tables

Sort, filter rows. Borders, width, alignment, hover. Responsive, scrollable. Fixed headers, footers, first column.

Grids

Responsive, regular, fractional grids. Cell widths, gaps, wrapping.

Forms

Inline, stacked, aligned, responsive forms. Inputs, buttons, lookups, calendar, validation, restore.

Interactive

Toggle, modal, dropdown, popup, tooltip, drawer, topbar, tabs, gallery, tree. Responsive classes. Copy items. Drag sort. Splitter.

Icons

32 general purpose simple SVG icons.
Extended iconset with 80 icons.

Typography

Text Link No-link Code Kbd Quote Small Mark Abbr xsub xsuper


Block quote
Preformatted text
Code: window.innerWidth = , window.devicePixelRatio = 
Heading

Longer headings · Longer texts

Heading 1
has a second line

Some text. More text. And more text. And more text. And more text. And more text. Another word. And more text. Like this one.
Final line.

Heading 2
has a second line

Some text. More text. And more text. And more text. And more text. And more text. Another word. And more text. Like this one.
Final line.

Heading 3
has a second line

Some text. More text. And more text. And more text. And more text. And more text. Another word. And more text. Like this one.
Final line.

Heading 4
has a second line

Some text. More text. And more text. And more text. And more text. And more text. Another word. And more text. Like this one.
Final line.
Heading 5
has a second line
Some text. More text. And more text. And more text. And more text. And more text. Another word. And more text. Like this one.
Final line.
Heading 6
has a second line
Some text. More text. And more text. And more text. And more text. And more text. Another word. And more text. Like this one.
Final line.
Font
Small Regular Larger Large Largest
Sans-serif Serif Mono
Color
Error Warning Success Info Note
Error Warning Success Info Note
Error Warning Success Info Note
8 ERR WARN OK INFO NOTE


Colorize icon and text Colorize only icon

Badge9 Users3 Texts5 Errors8 Warnings Messages99+ Notes1000

Link With icon42

Invert

Text Link No-link Mark Abbr .inv a.inv .inv.bg OK

Text Link No-link Mark Abbr .inv a.inv .inv.bg OK

Text Link No-link Mark Abbr .inv a.inv .inv.bg OK

Modifiers
Classdivula.rowtableform
.fit  No (margin, padding, border, radius, list-style),
1rem, smaller inner margins
****dense*
.mar  Margin******
.bord  Border******
.pad  Padding***h-gapline*
.mid  Centrify vertically---valign row, itemvalign table, tr, td-
.l  Align*horizontalright marginv-gap, align itemwide; .roll.l=fixHeight*
.resp  Responsive component-*scroll into viewstackstackstack
.act  Active link, input validation--color.drop on focus-validation
.hover  Shade on hover***ul atr-
.stack  No edge margins**--*-

Lists

Unordered list test

  • Basic
  • List
    • Sub
    • Item
  • Last

Ordered list test

  1. Ordered
  2. List
    1. Subitem
    2. Item
  3. Final

Definition list test

Term
Definition
Word
Describe
Explain

Tables

Style

    Sortable

  NameAreaPeopleCities
Europe 10.2 0.7 Istanbul, Moscow, London, Paris
Asia 44.6 4.6 Tokyo, Delhi, Shanghai, Mumbai
Africa 30.4 1.3 Cairo, Lagos
North America 24.7 0.6 Mexico, New York
South America 17.8 0.43 Sao Paulo, Buenos Aires
Australia 8.6 0.04 Sydney
Antarctica 14 0
Σ150.37.6
Features by file
File and featuresSource size
granum-basic.css
typography, colors, lists, table, simple responsive grid and navbar, responsive forms, buttons, toggle
6.0k
granum.css
everything mentioned above plus: bars, tags, modals, tabs, drawer, sticky, full height
9.0k
granum.js
check all boxes, align table columns, sort table, confirm link and form, prompt link, togglers, toggle classes, responsive classes, add/remove/order items
5.8k
granum-icons.css
32 SVG icons as CSS background
7.7k
granum-grid.css
advanced responsive grid
1.3k
granum-dropdown.css
dropdown menu, popups, tooltips
1.4k
granum-dialog.js
custom alert, confirm, prompt
2.2k
granum-restore.js
restore input values from URL or from local storage
1.7k
granum-gallery.js
image gallery
1.2k
granum-lookup.js (requires granum-dropdown.css)
lookup input
3.5k
granum-calendar.js (requires granum-dropdown.css)
date input
3.5k
granum-edit.js
visual text editor
3.6k
granum-drag.js
drag sort
1.5k
granum-full.css + granum-full.js
everything mentioned above
36k
19.6k + 22.9k

Grids

Auto
One
Two middle
Three
text
text
Photo
User Name
Full height
Centered
Advanced grid







C
D
E
F
A
B
C
D
Sticky header and footer
Header

First line

Line

Line

Line

Line

Line

Line

Line

Line

Line

Line

Line

Line

Line

Last line

Footer
Stack

Stacked paragraph one.

Stacked paragraph two.

Stacked paragraph three.

Stacked div one.
Stacked div two.
Stacked div three.
Splitter

Splitter test

First item (article.col-2)
Second item (div)
Third item
3
Fourth item
4
Fifth item
5
Fixed scrollable layout

Forms

  This is inline form


Required OK



Input types
Fieldset




Radio


Calendar
With date/datetime inputs:



With text inputs:



Buttons

Link Link Link Link Text
Editor

This form uses p

Required
This form uses .field
Alternative form layouts
This form uses .row
This form uses table

Interactive

Toggle Toggle+scroll Modal Drawer Topbar

Target

Pop
Pop
   
Info-topHint top
   
Pop-left
Pop left
   
Info-right Hint right
ToolsItemStatus

Toggle class

  Item 1 Item 2
    Item 1 Item 2
Item 1 Item 2

Drag

  • One
  • Two
  • ::Three::
Alpha
Beta
::Gamma::

Icons

Extended iconset

Show

Add-ons

Drag me
Draggable content

Fill text.

Fill text.