mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-06-03 04:50:10 -04:00
Fix indent for folder items without ancestors
These make space for the folder icon using padding-left when they have ancestors as they are inline so it only effects the line the first link is on. Without ancestors they are block-level so padding-left pads the whole block. We had a block of CSS that fixed this, by using text-indent for those without ancestors but the selector was broken by changes to the HTML (it was no longer the :first-child). This uses the :first-of-type pseudo-class instead to ignore preceding elements of different types. Also includes changes that move styles for links out from under elements with a class of .message-name, which was removed in the previous commit.
This commit is contained in:
@@ -28,34 +28,26 @@ $govuk-checkboxes-size: 40px;
|
||||
$govuk-checkboxes-label-padding-left-right: govuk-spacing(3);
|
||||
$message-type-bottom-spacing: govuk-spacing(4);
|
||||
|
||||
.message {
|
||||
|
||||
&-name {
|
||||
margin: 0;
|
||||
|
||||
a {
|
||||
|
||||
&:hover .message-name-separator:before {
|
||||
border-color: $link-hover-colour;
|
||||
}
|
||||
|
||||
.message-name-separator {
|
||||
|
||||
margin-right: -2px;
|
||||
margin-left: -2px;
|
||||
|
||||
&:before {
|
||||
border-color: $link-colour;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&-separator {
|
||||
@include separator;
|
||||
}
|
||||
a {
|
||||
|
||||
&:hover .message-name-separator:before {
|
||||
border-color: $link-hover-colour;
|
||||
}
|
||||
|
||||
.message-name-separator {
|
||||
|
||||
margin-right: -2px;
|
||||
margin-left: -2px;
|
||||
|
||||
&:before {
|
||||
border-color: $link-colour;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.message-name-separator {
|
||||
@include separator;
|
||||
}
|
||||
|
||||
.template-list {
|
||||
@@ -72,18 +64,20 @@ $message-type-bottom-spacing: govuk-spacing(4);
|
||||
|
||||
&-without-ancestors {
|
||||
|
||||
.message-name {
|
||||
a {
|
||||
|
||||
a {
|
||||
display: block;
|
||||
|
||||
&:first-child {
|
||||
display: block;
|
||||
}
|
||||
|
||||
&:first-child {
|
||||
display: block;
|
||||
}
|
||||
&.template-list-folder:first-of-type {
|
||||
background-position: 0 2px;
|
||||
padding-left: 0;
|
||||
text-indent: 35px;
|
||||
|
||||
&.template-list-folder:first-child {
|
||||
background-position: 0 2px;
|
||||
padding-left: 0;
|
||||
@include govuk-media-query($from: tablet) {
|
||||
text-indent: 40px;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user