Skip to content

Commit

Permalink
fix(data list): remove overqualified selectors
Browse files Browse the repository at this point in the history
  • Loading branch information
hxltrhuxze committed Mar 23, 2020
1 parent d090db5 commit 5d64db5
Showing 1 changed file with 45 additions and 48 deletions.
93 changes: 45 additions & 48 deletions packages/css-framework/src/components/_data-list.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,65 +5,62 @@
&.is-collapsible {
border-radius: 3px;

.rn-data-list {
.rn-data-list__header {
padding: f.spacing("3") f.spacing("2") f.spacing("3") f.spacing("2");
background-color: f.color("neutral", "white");
border-bottom: 1px solid f.color("neutral", "100");
transition: color config.$animation-timing;
cursor: pointer;
outline: none;
pointer-events: all;
&:hover {
background-color: f.color("neutral", "000");
.rn-data-list__action {
background-color: f.color("neutral", "200");
}

.rn-data-list__header {
padding: f.spacing("3") f.spacing("2") f.spacing("3") f.spacing("2");
background-color: f.color("neutral", "white");
border-bottom: 1px solid f.color("neutral", "100");
transition: color config.$animation-timing;
cursor: pointer;
outline: none;
pointer-events: all;
&:hover {
background-color: f.color("neutral", "000");
.rn-data-list__action {
background-color: f.color("neutral", "200");
}
}
}

.rn-data-list__badge {
display: inline-block;
margin-left: f.spacing("4");
}

.rn-data-list__badge {
display: inline-block;
margin-left: f.spacing("4");
.rn-data-list__action {
border-radius: 3px;
padding: f.spacing("2") f.spacing("2") f.spacing("2") f.spacing("2");
display: flex;
background: f.color("neutral", "100");
transition: background-color config.$animation-timing;
svg {
transform: translate(-1px, 0);
transition: transform config.$animation-timing;
}
}

.rn-data-list__sheet {
transform: scale(1, 0);
transform-origin: 0 0;
height: 0;
overflow: hidden;
transition: all config.$animation-timing;
background-color: f.color("neutral", "white");
}
.rn-data-list__item {
padding: f.spacing("4") f.spacing("4");
}

&.is-expanded {
.rn-data-list__action {
border-radius: 3px;
padding: f.spacing("2") f.spacing("2") f.spacing("2") f.spacing("2");
display: flex;
background: f.color("neutral", "100");
transition: background-color config.$animation-timing;
svg {
transform: translate(-1px, 0);
transition: transform config.$animation-timing;
transform: rotate(180deg) translate(0, 1px);
}
}

.rn-data-list__sheet {
transform: scale(1, 0);
transform-origin: 0 0;
height: 0;
transform: scale(1, 1);
height: unset;
overflow: hidden;
transition: all config.$animation-timing;
background-color: f.color("neutral", "white");
}
.rn-data-list__item {
padding: f.spacing("4") f.spacing("4");
}
}

&.is-expanded {
.rn-data-list {
.rn-data-list__action {
svg {
transform: rotate(180deg) translate(0, 1px);
}
}
.rn-data-list__sheet {
transform: scale(1, 1);
height: unset;
overflow: hidden;
}
}
}
}
Expand Down

0 comments on commit 5d64db5

Please sign in to comment.