@@ -29,11 +29,13 @@ Nebula CSS also ships with some common yet useful abstractions such as the Flag
29
29
* [ Breakpoints] ( #breakpoints )
30
30
* [ Grid] ( #grid )
31
31
* [ Flag] ( #flag )
32
+ * [ Section] ( #section )
32
33
* [ Site-wrap] ( #site-wrap )
33
34
* [ Lists] ( #lists )
34
35
* [ Bare list] ( #bare-list )
35
36
* [ Inline list] ( #inline-list )
36
37
* [ Matrix list] ( #matrix-list )
38
+ * [ Uniformed list] ( #uniformed-list )
37
39
* [ Utilities] ( #utilities )
38
40
* [ Push] ( #push )
39
41
* [ Flush] ( #flush )
@@ -530,43 +532,49 @@ Varying guttering depending on the breakpoint
530
532
531
533
There are various BEM modifiers that you can add to the grid as shown below:
532
534
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 )
534
537
535
538
``` html
536
539
<div class =" o-grid o-grid--gutter-sm o-grid--matrix" />
537
540
```
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)
539
543
540
544
```html
541
545
<div class =" o-grid o-grid--equal-height" />
542
546
```
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)
544
549
545
550
```html
546
551
<div class =" o-grid o-grid--reverse" />
547
552
```
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)
549
555
550
556
```html
551
557
<div class =" o-grid o-grid--center" />
552
558
```
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)
554
561
555
562
```html
556
563
<div class =" o-grid o-grid--bottom" />
557
564
```
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 )
559
567
560
568
``` html
561
569
<div class =" o-grid u-text-center" />
562
570
```
563
571
564
572
## Flag
565
573
566
- [Demo](http://rbrtsmith.com/nebula-css/demo/#flag)
567
-
568
574
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.
569
575
576
+ [Demo](http://rbrtsmith.com/nebula-css/demo/#flag)
577
+
570
578
```html
571
579
<div class =" o-flag" >
572
580
<div class =" o-flag__component" >
@@ -579,35 +587,51 @@ One of most underrated CSS abstractions originally thought up by [Harry Roberts]
579
587
```
580
588
581
589
## 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 )
583
592
584
593
``` html
585
594
<div class =" o-site-wrap o-site-wrap--padding" >
586
595
Main content.
587
596
</div >
588
597
```
589
598
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.
591
604
605
+ ``` html
606
+ <div class =" o-section-md" >
607
+ Main content.
608
+ </div >
609
+ ```
610
+
611
+ ## Lists
592
612
Nebula CSS comes with three types of list: Bare-list, Inline-list and Matrix-list.
613
+ [ demo] ( http://rbrtsmith.com/nebula-css/demo/#lists )
593
614
594
615
### 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 )
596
618
``` html
597
619
<ul class =" o-bare-list" >
598
620
<li >item</li >
599
621
<li >item</li >
600
622
</ul >
601
623
```
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 )
603
626
``` html
604
627
<ul class =" o-bare-list o-bare-list--spaced-md" >
605
628
<li class =" o-bare-list__item" >item</li >
606
629
<li class =" o-bare-list__item" >item</li >
607
630
</ul >
608
631
```
609
632
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 )
611
635
``` html
612
636
<ul class =" o-bare-list o-bare-list--spaced-md@sm" >
613
637
<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
616
640
```
617
641
618
642
## 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 )
620
645
``` html
621
646
<ul class =" o-inline-list" >
622
647
<li >item</li >
623
648
<li >item</li >
624
649
</ul >
625
650
```
626
- Spaced [ Demo] ( http://rbrtsmith.com/nebula-css/demo/#inline-list-spaced )
627
651
``` html
652
+ Spaced [Demo](http://rbrtsmith.com/nebula-css/demo/#inline-list-spaced)
628
653
<ul class =" o-inline-list o-inline-list--spaced-md" >
629
654
<li class =" o-inline-list__item" >item</li >
630
655
<li class =" o-inline-list__item" >item</li >
631
656
</ul >
632
657
```
633
658
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 )
635
661
``` html
636
662
<ul class =" o-inline-list o-inline-list--spaced-md@sm" >
637
663
<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
641
667
642
668
## Matrix list
643
669
Exactly like the inline list but the items vertical spacing matches the horizontal.
670
+ [ Demo] ( http://rbrtsmith.com/nebula-css/demo/#matrix-list )
644
671
645
672
Spaced
646
673
``` html
@@ -650,20 +677,42 @@ Spaced
650
677
</ul >
651
678
```
652
679
653
- Spaced by breakpoint [ Demo ] ( http://rbrtsmith.com/nebula-css/demo/#matrix-list )
680
+ Spaced by breakpoint
654
681
``` html
655
682
<ul class =" o-matrix-list o-matrix-list--spaced-md@sm" >
656
683
<li class =" o-matrix-list__item" >item</li >
657
684
<li class =" o-matrix-list__item" >item</li >
658
685
</ul >
659
686
```
660
- ##utilities
661
687
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
662
708
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) )
663
710
664
711
### Push
712
+ Adds margins.
713
+ [ Demo] ( (http://rbrtsmith.com/nebula-css/demo/#push) )
665
714
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
667
716
668
717
``` html
669
718
<div class =" u-push-left-md" ></div >
@@ -683,6 +732,8 @@ Removes margins
683
732
684
733
### Soft
685
734
Adds padding
735
+ [ Demo] ( (http://rbrtsmith.com/nebula-css/demo/#soft) )
736
+
686
737
``` html
687
738
<div class =" u-soft-md" ></div >
688
739
<div class =" u-soft-top-md" ></div >
@@ -705,15 +756,17 @@ Removes padding
705
756
706
757
### Text-align
707
758
Adds text-alignment.
759
+ [ Demo] ( (http://rbrtsmith.com/nebula-css/demo/#text-align) )
708
760
``` html
709
761
<div class =" u-text-left" ></div >
710
762
<div class =" u-text-center" ></div >
711
763
<div class =" u-text-right" ></div >
712
764
```
713
765
714
766
### Hidden
715
-
716
767
Hides elements, or visually hides (Still accessible.)
768
+ [ Demo] ( (http://rbrtsmith.com/nebula-css/demo/#hidden) )
769
+
717
770
``` html
718
771
<div class =" u-hidden" ></div >
719
772
<div class =" u-visually-hidden" ></div >
0 commit comments