Calc dimension including margin/padding
This commit is contained in:
@@ -19,8 +19,8 @@ RV-Fan--horizontal(base-height, base-width)
|
||||
flex-direction row
|
||||
|
||||
+RV-Element('Surface')
|
||||
min-width base-width
|
||||
height base-height
|
||||
min-width calc_width(base-width)
|
||||
height calc_height(base-height)
|
||||
|
||||
/*
|
||||
* Base above, Surfce below
|
||||
@@ -33,9 +33,10 @@ RV-Fan--vertical(base-height, base-width)
|
||||
width max-content
|
||||
|
||||
+RV-Element('Surface')
|
||||
width base-width
|
||||
width calc_width(base-width)
|
||||
min-height base-height
|
||||
|
||||
|
||||
/*
|
||||
* Initialy horizontal, changes to vertical when
|
||||
* the width of the parent is less than 2 x base-width
|
||||
@@ -46,9 +47,9 @@ RV-Fan--auto(base-height, base-width)
|
||||
flex-flow row wrap
|
||||
|
||||
+RV-Element('Surface')
|
||||
width 'calc(100% - %s)' % base-width
|
||||
min-width base-width
|
||||
height base-height
|
||||
min-width calc_width('calc(%s)' % base-width)
|
||||
width calc_width('calc(100% - %s)' % base-width)
|
||||
height calc_height(base-height)
|
||||
|
||||
/*
|
||||
* Also initialy horizontal, changes to vertical when
|
||||
@@ -72,29 +73,35 @@ RV-Fan--fullWidth(base-height, base-width)
|
||||
* ############### */
|
||||
RV-Fan__Base(base-height, base-width)
|
||||
+RV-Element--name('Base')
|
||||
height base-height
|
||||
width base-width
|
||||
height calc_height(base-height)
|
||||
width calc_width(base-width)
|
||||
flex 0 0 auto
|
||||
|
||||
RV-Fan__Surface--fixedHeight(height)
|
||||
+RV-Element__Modifier--name('fixedHeight')
|
||||
height height
|
||||
height calc_height(height)
|
||||
|
||||
RV-Fan__Surface--fixedWidth(width)
|
||||
+RV-Element__Modifier--name('fixedWidth')
|
||||
max-width width
|
||||
max-width calc_width(width)
|
||||
|
||||
RV-Fan__Surface()
|
||||
RV-Fan__Surface(base-height, base-width)
|
||||
+RV-Element--name('Surface')
|
||||
|
||||
RV-ContentCrop()
|
||||
RV-ContentCrop__Text()
|
||||
RV-ContentCrop__Image()
|
||||
|
||||
overflow hidden
|
||||
height calc_height(base-height)
|
||||
width calc_width()
|
||||
|
||||
/* ############
|
||||
* Block Mixin
|
||||
* ############ */
|
||||
RV-Fan()
|
||||
display flex
|
||||
position relative
|
||||
|
||||
/* #########
|
||||
* CSS-Class
|
||||
@@ -104,10 +111,12 @@ RV-Fan()
|
||||
base-height: 280px,
|
||||
base-width: 320px
|
||||
})
|
||||
|
||||
--inner-spacing 0px
|
||||
|
||||
RV-Fan()
|
||||
+RV-Element()
|
||||
RV-Fan__Surface()
|
||||
RV-Fan__Surface(base-height, base-width)
|
||||
|
||||
+RV-Element__Modifier()
|
||||
RV-Fan__Surface--fixedWidth(base-width)
|
||||
|
Reference in New Issue
Block a user