SCSS: Center element without dimmension, only with width/height, with width and height

1
2
@mixin centered($width: null, $height: null){
position: absolute;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Latest version
- Add example

2 Responses

Typo on line 5 - `if not $widht and not $height {` should be `if not $width and not $height {`.
Cheers
@James Hobson Thank you, man!

Write a comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.