Fix create new bucket button having no margin to the right

This commit is contained in:
kolaente 2020-08-11 20:57:55 +02:00
parent d95571309b
commit 0ae73c906d
No known key found for this signature in database
GPG key ID: F40E70337AB24C9B

View file

@ -1,6 +1,7 @@
$bucket-background: #e8f0f5;
$task-background: $white;
$ease-out: all .3s cubic-bezier(0.23, 1, 0.32, 1);
$bucket-width: 300px;
$crazy-height-calculation: '100vh - 4.5rem - 1.5rem - 1em - 1.5em - 8px';
@ -24,11 +25,11 @@ $crazy-height-calculation: '100vh - 4.5rem - 1.5rem - 1em - 1.5em - 8px';
border-radius: $radius;
position: relative;
flex: 0 0 300px;
flex: 0 0 $bucket-width;
margin: 0 1em 0 0;
max-height: 100%;
min-height: 20px;
max-width: 300px;
max-width: $bucket-width;
.tasks {
max-height: calc(#{$crazy-height-calculation} - 1rem - 2.5rem - 2em - #{$button-height} - 1em);
@ -199,13 +200,17 @@ $crazy-height-calculation: '100vh - 4.5rem - 1.5rem - 1em - 1.5em - 8px';
}
&.new-bucket {
background: $bucket-background;
display: block;
// Because of reasons, this button ignores the margin we gave it to the right.
// To make it still look like it has some, we modify the container to have a padding of 1rem,
// which is the same as the margin it should have. Then we make the container itself bigger
// to hide the fact we just made the button smaller.
min-width: calc(#{$bucket-width} + 1rem);
background: transparent;
padding-right: 1rem;
.button {
background: $bucket-background;
width: 100%;
background: transparent;
}
}
}