diff --git a/css/style.css b/css/style.css index 3ea548f94bc97fb13f295c2c6d6ed2d8c5d0bc99..301036457074102562a9c033a02cc81e5d4e06cc 100644 --- a/css/style.css +++ b/css/style.css @@ -308,3 +308,48 @@ ul.commentlist { .navbar-collapse.in { overflow-y: visible; } + +/* + * Collapse with preview + */ + +body { + padding-top: 2rem; +} + +.module .collapse, .module .collapsing { + height: 3rem; /* [NUM_OF_LINES] x [LINE_HEIGHT] */ +} + +.module .collapse { + position: relative; /* For ...'s content absolute positioning */ + display: block; + overflow: hidden; + float: right; +} + +.module .collapse:before { + content: ''; + position: absolute; + right: 0; + bottom: 0; +} + +.module .collapse.show { + height: auto; /* You need to reset the height when not collapsed */ +} + +.module .collapse.show:before { + display: none; /* Of course you don't want to display ... */ +} + + + +.module a.collapsed:after { + content: '+ Voir plus'; +} + +.module a:not(.collapsed):after { + content: '- Voir moins'; +} +