From d1da18cd287ff393aa438144f6ea1dbab90be314 Mon Sep 17 00:00:00 2001 From: Siddharth Varshney Date: Wed, 25 Mar 2020 05:18:20 +0530 Subject: [PATCH] css: Use SCSS nesting for `.portico-header .dropdown` in portico.scss. --- static/styles/portico/portico.scss | 103 ++++++++++++++--------------- 1 file changed, 50 insertions(+), 53 deletions(-) diff --git a/static/styles/portico/portico.scss b/static/styles/portico/portico.scss index da902d06da..0d1fd994ad 100644 --- a/static/styles/portico/portico.scss +++ b/static/styles/portico/portico.scss @@ -586,69 +586,66 @@ input.text-error { .portico-header .dropdown { position: relative; display: inline-block; -} -.portico-header .dropdown ul { - display: none; - - position: absolute; - right: 0px; - margin: 10px 0 0 0; - list-style-type: none; - width: 200px; - - background-color: hsl(0, 0%, 100%); - padding: 5px 0px; - - border-radius: 4px; - border: 1px solid hsl(0, 0%, 87%); - box-shadow: 0px 2px 5px hsla(0, 0%, 0%, 0.1); - - &::before { - content: "\25B2"; + ul { + display: none; position: absolute; - top: -4px; - right: 9px; - font-size: 0.5em; - color: hsl(0, 0%, 87%); - line-height: 0; - transform: scale(1.8, 1); - } + right: 0px; + margin: 10px 0 0 0; + list-style-type: none; + width: 200px; + background-color: hsl(0, 0%, 100%); + padding: 5px 0px; + border-radius: 4px; + border: 1px solid hsl(0, 0%, 87%); + box-shadow: 0px 2px 5px hsla(0, 0%, 0%, 0.1); - li { - display: list-item; - margin: 0; - padding: 3px 10px; - text-align: left; - opacity: 1; - cursor: pointer; - &:hover { - background-color: hsl(190, 10%, 90%); - transition: none; + &::before { + content: "\25B2"; + position: absolute; + top: -4px; + right: 9px; + font-size: 0.5em; + color: hsl(0, 0%, 87%); + line-height: 0; + transform: scale(1.8, 1); } - a { - display: block; - margin: 2px 0px; - padding: 0px; - transition: none; - font-size: 0.9em; - font-weight: 400; - color: hsl(0, 0%, 27%); - } + li { + display: list-item; + margin: 0; + padding: 3px 10px; + text-align: left; + opacity: 1; + cursor: pointer; + &:hover { + background-color: hsl(190, 10%, 90%); + transition: none; + } - &:hover a { - background-color: transparent; - } + a { + display: block; + margin: 2px 0px; + padding: 0px; + transition: none; + font-size: 0.9em; + font-weight: 400; + color: hsl(0, 0%, 27%); + } - a i { - margin-right: 5px; + &:hover a { + background-color: transparent; + } + + a i { + margin-right: 5px; + } } } -} -.portico-header .dropdown.show ul { - display: block; + &.show ul { + display: block; + } } .portico-header .dropdown-pill {