Add extractor and builder

Tested and working
This commit is contained in:
Angelos Chalaris
2019-08-22 14:04:18 +03:00
parent 343f8fd4c7
commit a8818b1998
101 changed files with 18465 additions and 9908 deletions

View File

@ -6,14 +6,10 @@ tags: layout,intermediate
Given an element of variable width, it will ensure its height remains proportionate in a responsive fashion
(i.e., its width to height ratio remains constant).
#### HTML
```html
<div class="constant-width-to-height-ratio"></div>
```
#### CSS
```css
.constant-width-to-height-ratio {
background: #333;
@ -31,8 +27,6 @@ Given an element of variable width, it will ensure its height remains proportion
}
```
#### Demo
#### Explanation
`padding-top` on the `::before` pseudo-element causes the height of the element to equal a percentage of