Skip to content
Snippets Groups Projects
Commit ef21492a authored by David Rouquet's avatar David Rouquet
Browse files

Collapse paragraph with preview

parent 8343a0e2
Branches
No related tags found
No related merge requests found
...@@ -308,3 +308,48 @@ ul.commentlist { ...@@ -308,3 +308,48 @@ ul.commentlist {
.navbar-collapse.in { .navbar-collapse.in {
overflow-y: visible; 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';
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment