From 2a8a80e859f839c4fedcd7bf8a1192f820916fd2 Mon Sep 17 00:00:00 2001 From: Andreas Nedbal Date: Sat, 2 May 2020 18:29:04 +0200 Subject: [PATCH] Refactor locale panel styles --- app/assets/stylesheets/application.scss | 1 + app/assets/stylesheets/base.css.scss | 1 - .../{scss/flags.scss => components/_locales.scss} | 9 ++++----- app/views/shared/_locales.haml | 2 +- 4 files changed, 6 insertions(+), 7 deletions(-) rename app/assets/stylesheets/{scss/flags.scss => components/_locales.scss} (79%) diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss index 38e150ea..bc77e7ca 100644 --- a/app/assets/stylesheets/application.scss +++ b/app/assets/stylesheets/application.scss @@ -80,6 +80,7 @@ "components/container", "components/entry", "components/jumbotron", +"components/locales", "components/notifications", "components/profile", "components/question", diff --git a/app/assets/stylesheets/base.css.scss b/app/assets/stylesheets/base.css.scss index 19298aba..75cb4c14 100644 --- a/app/assets/stylesheets/base.css.scss +++ b/app/assets/stylesheets/base.css.scss @@ -1,5 +1,4 @@ /* all custom SCSS should go into here */ -@import "scss/flags"; @import "scss/answerbox"; @import "scss/comments"; \ No newline at end of file diff --git a/app/assets/stylesheets/scss/flags.scss b/app/assets/stylesheets/components/_locales.scss similarity index 79% rename from app/assets/stylesheets/scss/flags.scss rename to app/assets/stylesheets/components/_locales.scss index cee8e6e2..48a6ff5c 100644 --- a/app/assets/stylesheets/scss/flags.scss +++ b/app/assets/stylesheets/components/_locales.scss @@ -1,16 +1,15 @@ .locales { text-align: center; - #locales-panel { + &__panel { position: relative; display: none; padding: 5px; ul { - border-top: 1px solid #aaa; margin: 0; padding: 0; - padding-top: 5px; + padding-top: map-get($spacers, 3); width: 100%; list-style: none; display: inline-flex; @@ -18,9 +17,9 @@ flex-wrap: wrap; align-items: center; justify-content: center; + li { - margin: 5px 10px; - margin-top: 0; + margin: 0 5px 10px 5px; flex: 0 0 auto; * { diff --git a/app/views/shared/_locales.haml b/app/views/shared/_locales.haml index 70a187f5..36b3e4cc 100644 --- a/app/views/shared/_locales.haml +++ b/app/views/shared/_locales.haml @@ -4,7 +4,7 @@ %a{href: '#', id: 'locale-switch'} %i.fa.fa-globe = t('views.locale.languages') - #locales-panel + #locales-panel.locales__panel %ul - APP_LOCALES.each do |key, value| %li