122 lines
2.1 KiB
Stylus
122 lines
2.1 KiB
Stylus
/*
|
|
* Classes for easy flexrow usage
|
|
*/
|
|
|
|
/*
|
|
* Orientation
|
|
*/
|
|
RV-FlexRow--horizontal()
|
|
+RV-Block--modifier()
|
|
flex-direction row
|
|
|
|
RV-FlexRow--vertical()
|
|
+RV-Block--modifier()
|
|
flex-direction column
|
|
|
|
/*
|
|
* Typical Flexbox behavior, Row is horizontal, but item are wraped individualy
|
|
*/
|
|
RV-FlexRow--wrap()
|
|
+RV-Block--modifier()
|
|
flex-direction row
|
|
flex-wrap wrap
|
|
|
|
|
|
/* ##########
|
|
* Item class
|
|
########### */
|
|
RV-FlexRow__Item()
|
|
+RV-Element()
|
|
flex-grow 3
|
|
flex-shrink 3
|
|
|
|
/*
|
|
* Varios relative width of items to each other
|
|
*/
|
|
|
|
RV-FlexRow__Item--narrower()
|
|
+RV-Element--modifier()
|
|
flex-grow 1
|
|
flex-shrink 5
|
|
|
|
RV-FlexRow__Item--narrow()
|
|
+RV-Element--modifier()
|
|
flex-grow 2
|
|
flex-shrink 4
|
|
|
|
RV-FlexRow__Item--wide()
|
|
+RV-Element--modifier()
|
|
flex-grow 4
|
|
flex-shrink 2
|
|
|
|
RV-FlexRow__Item--wider()
|
|
+RV-Element--modifier()
|
|
flex-grow 5
|
|
flex-shrink 1
|
|
|
|
/*
|
|
* Item has always the given width
|
|
*/
|
|
RV-FlexRow__Item--fixedSize(width)
|
|
+RV-Element--modifier()
|
|
RV-Sizes--fixedSize(width)
|
|
|
|
/*
|
|
* Item width relativ to the container
|
|
*/
|
|
RV-FlexRow__Item--half()
|
|
+RV-Element--modifier()
|
|
flex-grow 0
|
|
flex-shrink 0
|
|
flex-basis 50%
|
|
|
|
RV-FlexRow__Item--third()
|
|
+RV-Element--modifier()
|
|
flex-grow 0
|
|
flex-shrink 0
|
|
flex-basis (100/3)%
|
|
|
|
RV-FlexRow__Item--quarter()
|
|
+RV-Element--modifier()
|
|
flex-grow 0
|
|
flex-shrink 0
|
|
flex-basis 25%
|
|
|
|
RV-FlexRow__Item--content()
|
|
+RV-Element--modifier()
|
|
flex-grow 0
|
|
flex-shrink 0
|
|
flex-basis max-content
|
|
|
|
/* ##########
|
|
* Block
|
|
########### */
|
|
RV-FlexRow()
|
|
display flex
|
|
|
|
+RV-Block('RV-FlexRow')
|
|
RV-FlexRow()
|
|
|
|
RV-CSSParameter({
|
|
width: 100px
|
|
localBreakPoint: 500px,
|
|
mediaBreakPoint: 100vw
|
|
})
|
|
|
|
+RV-Element()
|
|
RV-FlexRow__Item--narrower()
|
|
RV-FlexRow__Item--narrow()
|
|
RV-FlexRow__Item--wide()
|
|
RV-FlexRow__Item--wider()
|
|
RV-FlexRow__Item--fixedSize(--width)
|
|
RV-FlexRow__Item--narrower()
|
|
RV-FlexRow__Item--half()
|
|
RV-FlexRow__Item--third()
|
|
RV-FlexRow__Item--quarter()
|
|
RV-FlexRow__Item--content()
|
|
RV-FlexRow__Item()
|
|
|
|
RV-FlexRow--breakPoint(--localBreakPoint, --mediaBreakPoint)
|
|
RV-FlexRow--horizontal()
|
|
RV-FlexRow--vertical()
|
|
RV-FlexRow--wrap() |