Skip to content

Commit deda4d5

Browse files
committed
Update README & Demo
1 parent fafb829 commit deda4d5

File tree

2 files changed

+77
-24
lines changed

2 files changed

+77
-24
lines changed

README.md

Lines changed: 73 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,13 @@ Nebula CSS also ships with some common yet useful abstractions such as the Flag
2929
* [Breakpoints](#breakpoints)
3030
* [Grid](#grid)
3131
* [Flag](#flag)
32+
* [Section](#section)
3233
* [Site-wrap](#site-wrap)
3334
* [Lists](#lists)
3435
* [Bare list](#bare-list)
3536
* [Inline list](#inline-list)
3637
* [Matrix list](#matrix-list)
38+
* [Uniformed list](#uniformed-list)
3739
* [Utilities](#utilities)
3840
* [Push](#push)
3941
* [Flush](#flush)
@@ -530,43 +532,49 @@ Varying guttering depending on the breakpoint
530532

531533
There are various BEM modifiers that you can add to the grid as shown below:
532534

533-
* Matrix (Vertical guttering that matches horizontal) [Demo](http://rbrtsmith.com/nebula-css/demo/#grid-matrix)
535+
* Matrix (Vertical guttering that matches horizontal)
536+
[Demo](http://rbrtsmith.com/nebula-css/demo/#grid-matrix)
534537

535538
```html
536539
<div class="o-grid o-grid--gutter-sm o-grid--matrix" />
537540
```
538-
* Equal height items [Demo](http://rbrtsmith.com/nebula-css/demo/#grid-equal-height)
541+
* Equal height items
542+
[Demo](http://rbrtsmith.com/nebula-css/demo/#grid-equal-height)
539543

540544
```html
541545
<div class="o-grid o-grid--equal-height" />
542546
```
543-
* Reverse item order [Demo](http://rbrtsmith.com/nebula-css/demo/#grid-reverse)
547+
* Reverse item order
548+
[Demo](http://rbrtsmith.com/nebula-css/demo/#grid-reverse)
544549

545550
```html
546551
<div class="o-grid o-grid--reverse" />
547552
```
548-
* Vertically centered items [Demo](http://rbrtsmith.com/nebula-css/demo/#grid-vertically-centered)
553+
* Vertically centered items
554+
[Demo](http://rbrtsmith.com/nebula-css/demo/#grid-vertically-centered)
549555

550556
```html
551557
<div class="o-grid o-grid--center" />
552558
```
553-
* Bottom aligned items [Demo](http://rbrtsmith.com/nebula-css/demo/#grid-bottom-aligned)
559+
* Bottom aligned items
560+
[Demo](http://rbrtsmith.com/nebula-css/demo/#grid-bottom-aligned)
554561

555562
```html
556563
<div class="o-grid o-grid--bottom" />
557564
```
558-
* Horizontally centered items [Demo](http://rbrtsmith.com/nebula-css/demo/#grid-horizontally-aligned)
565+
* Horizontally centered items
566+
[Demo](http://rbrtsmith.com/nebula-css/demo/#grid-horizontally-aligned)
559567

560568
```html
561569
<div class="o-grid u-text-center" />
562570
```
563571

564572
## Flag
565573

566-
[Demo](http://rbrtsmith.com/nebula-css/demo/#flag)
567-
568574
One of most underrated CSS abstractions originally thought up by [Harry Roberts](https://twitter.com/csswizardry) is the flag object. It allows you to mix up fixed width components with fluid ones, is infinitely composable can be nested inside of the grid, or a grid nested inside of the fluid component it's incredibly versatile. Oh and it also allows you to vertically align the contents to boot.
569575

576+
[Demo](http://rbrtsmith.com/nebula-css/demo/#flag)
577+
570578
```html
571579
<div class="o-flag">
572580
<div class="o-flag__component">
@@ -579,35 +587,51 @@ One of most underrated CSS abstractions originally thought up by [Harry Roberts]
579587
```
580588

581589
## Site-wrap
582-
A simple max-width centered container to wrap your content. You can see it applied throughout the demo page. The `--padding` modifier adds horizontal padding to the container.
590+
A simple max-width centred container to wrap your content. You can see it applied throughout the demo page. The `--padding` modifier adds horizontal padding to the container.
591+
[demo](http://rbrtsmith.com/nebula-css/demo/#site-wrap)
583592

584593
```html
585594
<div class="o-site-wrap o-site-wrap--padding">
586595
Main content.
587596
</div>
588597
```
589598

590-
## Lists
599+
## Section
600+
Adds padding top & bottom. The `md` suffix in this example maps onto a corresponding key on the `$nb-section-spacing` map that denotes the spacing amount.
601+
[demo](http://rbrtsmith.com/nebula-css/demo/#section)
602+
603+
Typically used to space sections and sub-sections of content.
591604

605+
```html
606+
<div class="o-section-md">
607+
Main content.
608+
</div>
609+
```
610+
611+
## Lists
592612
Nebula CSS comes with three types of list: Bare-list, Inline-list and Matrix-list.
613+
[demo](http://rbrtsmith.com/nebula-css/demo/#lists)
593614

594615
### Bare-list
595-
Strips a list of all default list styling. [Demo](http://rbrtsmith.com/nebula-css/demo/#bare-list)
616+
Strips a list of all default list styling.
617+
[Demo](http://rbrtsmith.com/nebula-css/demo/#bare-list)
596618
```html
597619
<ul class="o-bare-list">
598620
<li>item</li>
599621
<li>item</li>
600622
</ul>
601623
```
602-
Spaced [Demo](http://rbrtsmith.com/nebula-css/demo/#bare-list-spaced)
624+
Spaced
625+
[Demo](http://rbrtsmith.com/nebula-css/demo/#bare-list-spaced)
603626
```html
604627
<ul class="o-bare-list o-bare-list--spaced-md">
605628
<li class="o-bare-list__item">item</li>
606629
<li class="o-bare-list__item">item</li>
607630
</ul>
608631
```
609632

610-
Spaced by breakpoint [Demo](http://rbrtsmith.com/nebula-css/demo/#bare-list-spaced-by-breakpoint)
633+
Spaced by breakpoint
634+
[Demo](http://rbrtsmith.com/nebula-css/demo/#bare-list-spaced-by-breakpoint)
611635
```html
612636
<ul class="o-bare-list o-bare-list--spaced-md@sm">
613637
<li class="o-bare-list__item">item</li>
@@ -616,22 +640,24 @@ Spaced by breakpoint [Demo](http://rbrtsmith.com/nebula-css/demo/#bare-list-spac
616640
```
617641

618642
## Inline list
619-
Exactly like the bare list but the items are rendered horizontally. [Demo](http://rbrtsmith.com/nebula-css/demo/#inline-list)
643+
Exactly like the bare list but the items are rendered horizontally.
644+
[Demo](http://rbrtsmith.com/nebula-css/demo/#inline-list)
620645
```html
621646
<ul class="o-inline-list">
622647
<li>item</li>
623648
<li>item</li>
624649
</ul>
625650
```
626-
Spaced [Demo](http://rbrtsmith.com/nebula-css/demo/#inline-list-spaced)
627651
```html
652+
Spaced [Demo](http://rbrtsmith.com/nebula-css/demo/#inline-list-spaced)
628653
<ul class="o-inline-list o-inline-list--spaced-md">
629654
<li class="o-inline-list__item">item</li>
630655
<li class="o-inline-list__item">item</li>
631656
</ul>
632657
```
633658

634-
Spaced by breakpoint [Demo](http://rbrtsmith.com/nebula-css/demo/#inline-list-spaced-by-breakpoint)
659+
Spaced by breakpoint
660+
[Demo](http://rbrtsmith.com/nebula-css/demo/#inline-list-spaced-by-breakpoint)
635661
```html
636662
<ul class="o-inline-list o-inline-list--spaced-md@sm">
637663
<li class="o-inline-list__item">item</li>
@@ -641,6 +667,7 @@ Spaced by breakpoint [Demo](http://rbrtsmith.com/nebula-css/demo/#inline-list-sp
641667

642668
## Matrix list
643669
Exactly like the inline list but the items vertical spacing matches the horizontal.
670+
[Demo](http://rbrtsmith.com/nebula-css/demo/#matrix-list)
644671

645672
Spaced
646673
```html
@@ -650,20 +677,42 @@ Spaced
650677
</ul>
651678
```
652679

653-
Spaced by breakpoint [Demo](http://rbrtsmith.com/nebula-css/demo/#matrix-list)
680+
Spaced by breakpoint
654681
```html
655682
<ul class="o-matrix-list o-matrix-list--spaced-md@sm">
656683
<li class="o-matrix-list__item">item</li>
657684
<li class="o-matrix-list__item">item</li>
658685
</ul>
659686
```
660-
##utilities
661687

688+
## Uniformed list
689+
Throws the list items into a horizontal alignment, each having a uniformed width.
690+
[Demo](http://rbrtsmith.com/nebula-css/demo/#uniformed-list)
691+
692+
```html
693+
<ul class="o-uniformed-list">
694+
<li class="o-uniformed-list__item">item</li>
695+
<li class="o-uniformed-list__item">item</li>
696+
</ul>
697+
```
698+
699+
Uniformed by breakpoint.
700+
```html
701+
<ul class="o-uniformed-list@lg">
702+
<li class="o-uniformed-list__item">item</li>
703+
<li class="o-uniformed-list__item">item</li>
704+
</ul>
705+
```
706+
707+
##utilities
662708
Form the Utilities Layer in ITCSS, each a single responsibility class. They are intended to be used as overrides.
709+
[Demo]((http://rbrtsmith.com/nebula-css/demo/#utilities))
663710

664711
### Push
712+
Adds margins.
713+
[Demo]((http://rbrtsmith.com/nebula-css/demo/#push))
665714

666-
Adds margins, Nebula CSS encourages [single direction margin declarations](http://csswizardry.com/2012/06/single-direction-margin-declarations/) to eliminate confusion around collapsing borders
715+
Nebula CSS encourages [single direction margin declarations](http://csswizardry.com/2012/06/single-direction-margin-declarations/) to eliminate confusion around collapsing borders
667716

668717
```html
669718
<div class="u-push-left-md"></div>
@@ -683,6 +732,8 @@ Removes margins
683732

684733
### Soft
685734
Adds padding
735+
[Demo]((http://rbrtsmith.com/nebula-css/demo/#soft))
736+
686737
```html
687738
<div class="u-soft-md"></div>
688739
<div class="u-soft-top-md"></div>
@@ -705,15 +756,17 @@ Removes padding
705756

706757
### Text-align
707758
Adds text-alignment.
759+
[Demo]((http://rbrtsmith.com/nebula-css/demo/#text-align))
708760
```html
709761
<div class="u-text-left"></div>
710762
<div class="u-text-center"></div>
711763
<div class="u-text-right"></div>
712764
```
713765

714766
### Hidden
715-
716767
Hides elements, or visually hides (Still accessible.)
768+
[Demo]((http://rbrtsmith.com/nebula-css/demo/#hidden))
769+
717770
```html
718771
<div class="u-hidden"></div>
719772
<div class="u-visually-hidden"></div>

demo/index.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -679,7 +679,7 @@ <h3>Uniformed list at breakpoint</h3>
679679

680680
<section class="o-section-md" id="utilities">
681681
<h2>Utilities</h2>
682-
<h3>Push / Flush - Margins</h3>
682+
<h3 id="push">Push / Flush - Margins</h3>
683683
<p>Push adds margins using <code>$nb-spacing-unit</code>, use <code>flush</code> remove margin</p>
684684
<div class="c-demo-card u-push-bottom-md">
685685
<div class="c-demo-card-alt u-push-bottom-md">
@@ -697,7 +697,7 @@ <h3>Push / Flush - Margins</h3>
697697
</div>
698698
</div>
699699

700-
<h3>Soft / Hard - Padding</h3>
700+
<h3 id="soft">Soft / Hard - Padding</h3>
701701
<p>Soft adds padding using <code>$nb-spacing-unit</code>, use <code>hard</code> to remove padding</p>
702702
<div class="c-demo-card u-push-bottom-md">
703703
<div class="c-demo-card-alt u-soft-md">
@@ -730,7 +730,7 @@ <h3>Soft / Hard - Padding</h3>
730730
</div>
731731
</div>
732732

733-
<h3>Text align</h3>
733+
<h3 id="text-align">Text align</h3>
734734
<div class="c-demo-card u-push-bottom-md">
735735
<div class="u-text-center">
736736
Text center
@@ -747,7 +747,7 @@ <h3>Text align</h3>
747747
</div>
748748
</div>
749749

750-
<h3>Hidden</h3>
750+
<h3 id="hidden">Hidden</h3>
751751
<p>Note this uses <code>display: none;</code> use <code>u-visually-hidden</code> if you want the content to be accessible to screen readers.</p>
752752
<div class="c-demo-card u-push-bottom-md">
753753
hidden:

0 commit comments

Comments
 (0)