papercss/src/modals.less

98 lines
1.7 KiB
Plaintext
Raw Normal View History

@import './colors.less';
@import './container.less';
@import './utilities.less';
2017-12-06 17:12:17 +01:00
.translate(@x; @y) {
-webkit-transform: translate(@x, @y);
-ms-transform: translate(@x, @y);
transform: translate(@x, @y);
}
.transition-transform(@transition) {
-webkit-transition: -webkit-transform @transition;
-moz-transition: -moz-transform @transition;
-o-transition: -o-transform @transition;
transition: transform @transition;
}
.modal{
2017-12-06 17:12:17 +01:00
&:before{
content: "";
2017-12-06 17:12:17 +01:00
display: none;
background: rgba(0,0,0,.6);
position: fixed;
top: 0; left: 0; right: 0; bottom: 0;
2017-12-06 17:12:17 +01:00
z-index: 10;
}
&:target{
2017-12-06 17:12:17 +01:00
&:before{
2017-12-08 12:44:59 +01:00
display: flex;
}
2017-12-06 17:12:17 +01:00
.modal-body{
.translate(0, 0);
top: 20%;
2017-12-06 17:12:17 +01:00
}
}
.modal-body{
flex: 1 1 auto;
padding: 1.25rem;
background: @white;
border: 2px solid @muted-light;
word-wrap: break-word;
position: fixed;
z-index: 11;
2017-12-08 12:44:59 +01:00
max-width: 960px;
@media @medium-screen {
max-width: 85%;
}
@media @xsmall-screen {
max-width: 90%;
}
2017-12-06 17:12:17 +01:00
.translate(0, -500%);
.transition-transform(~"0.3s ease-out");
}
.btn-close{
color: @primary-light;
font-size: 30px;
text-decoration: none;
position: absolute; right: 0; top: 0;
.margin;
background: inherit;
&:hover{
color: @muted;
}
2017-12-06 17:12:17 +01:00
}
.modal-title, h4 {
margin-top: 0;
margin-bottom: 0.5rem;
}
.modal-subtitle, h5 {
.text-secondary;
margin-top: 0;
margin-bottom: 0.5rem;
}
.modal-text, p {
margin-top: 0;
margin-bottom: 1rem;
}
.modal-link + .modal-link,
a + a {
margin-left: 1.25rem;
}
a button {
text-decoration: none;
background: @white;
}
}