From 052d20d30d54b05ae5f214e0e21c26783f61b1f9 Mon Sep 17 00:00:00 2001 From: Steffen van Bergerem <svbergerem@online.de> Date: Mon, 5 Oct 2015 01:21:39 +0200 Subject: [PATCH] Move base.scss --- app/assets/stylesheets/_application.scss | 2 +- .../{new_styles/_base.scss => base.scss} | 65 +++++++++---------- app/views/people/contacts.haml | 2 +- app/views/people/index.html.haml | 2 +- app/views/people/show.html.haml | 2 +- app/views/streams/main_stream.html.haml | 2 +- app/views/tags/show.haml | 2 +- 7 files changed, 37 insertions(+), 40 deletions(-) rename app/assets/stylesheets/{new_styles/_base.scss => base.scss} (57%) diff --git a/app/assets/stylesheets/_application.scss b/app/assets/stylesheets/_application.scss index ab54a70bea..98ee7cc9b8 100644 --- a/app/assets/stylesheets/_application.scss +++ b/app/assets/stylesheets/_application.scss @@ -14,7 +14,7 @@ @import 'flash_messages'; @import 'sprites'; @import 'hovercard'; -@import 'new_styles/base'; +@import 'base'; @import 'new_styles/interactions'; @import 'spinner'; @import 'timeago'; diff --git a/app/assets/stylesheets/new_styles/_base.scss b/app/assets/stylesheets/base.scss similarity index 57% rename from app/assets/stylesheets/new_styles/_base.scss rename to app/assets/stylesheets/base.scss index 31a5aabfdd..b701adb49a 100644 --- a/app/assets/stylesheets/new_styles/_base.scss +++ b/app/assets/stylesheets/base.scss @@ -1,19 +1,21 @@ body { margin-top: $navbar-height; - padding : none; - - &.lock { - overflow: hidden; - } + padding: none; } -/* Overflow */ -h1, h2, h3, h4, h5, h6, +// Overflow +h1, +h2, +h3, +h4, +h5, +h6, p, blockquote, code, pre { word-wrap: break-word; } -a.tag { word-break: break-all; } + +.tag { word-break: break-all; } .avatar { border-radius: 4px; @@ -30,8 +32,8 @@ a.tag { word-break: break-all; } &.medium { height: auto; - width: auto; max-width: 75px; + width: auto; } } @@ -39,41 +41,36 @@ a.tag { word-break: break-all; } color: inherit; } -#back-to-top { - display: block; - color: white; - position: fixed; - z-index: 49; - right: 54px; +.back-to-top { + background-color: $border-dark-grey; + border-radius: 10px; bottom: 20px; - opacity: 0; + color: $white; + display: block; font-size: 2.9em; - padding: 0 12px 0 12px; - border-radius: 10px; - background-color: #aaa; - &:hover { opacity: 0.85 !important; } - &.visible { opacity: 0.5; } line-height: 1.5; -} + opacity: 0; + padding: 0 12px; + position: fixed; + right: 54px; + z-index: 49; -/* general purpose classes */ + &:hover, + &.visible:hover { + color: $white; + opacity: .85; + } -.small-horizontal-spacer { - min-height: 20px; + &.visible { opacity: .5; } } -.big-horizontal-spacer { - height: 50px; -} +// general purpose classes -/* responsive */ -@media (max-width: 767px) { - body { - padding : 0; - } +.small-horizontal-spacer { + min-height: 20px; } -/* badge color */ +// badge color .badge-important { background-color: $red; } diff --git a/app/views/people/contacts.haml b/app/views/people/contacts.haml index b1f416448d..b1e993f790 100644 --- a/app/views/people/contacts.haml +++ b/app/views/people/contacts.haml @@ -23,7 +23,7 @@ = render partial: 'people/person', locals: hash = will_paginate @contacts_of_contact, renderer: WillPaginate::ActionView::BootstrapLinkRenderer - %a{id:"back-to-top", title:"#{t('layouts.application.back_to_top')}", href:"#"} + %a.back-to-top#back-to-top{title: "#{t('layouts.application.back_to_top')}", href: "#"} ⇧ -if user_signed_in? && @person diff --git a/app/views/people/index.html.haml b/app/views/people/index.html.haml index a2076c3b2f..79a2f6595f 100644 --- a/app/views/people/index.html.haml +++ b/app/views/people/index.html.haml @@ -37,7 +37,7 @@ = will_paginate(@people) - %a{id:"back-to-top", title:"#{t('layouts.application.back_to_top')}", href:"#"} + %a.back-to-top#back-to-top{title: "#{t('layouts.application.back_to_top')}", href: "#"} ⇧ .col-md-4 diff --git a/app/views/people/show.html.haml b/app/views/people/show.html.haml index 56b51eb53c..618b6616d5 100644 --- a/app/views/people/show.html.haml +++ b/app/views/people/show.html.haml @@ -33,7 +33,7 @@ %span.loader.hidden .spinner - %a{id:"back-to-top", title:"#{t('layouts.application.back_to_top')}", href:"#"} + %a.back-to-top#back-to-top{title: "#{t('layouts.application.back_to_top')}", href: "#"} ⇧ -if user_signed_in? && @person diff --git a/app/views/streams/main_stream.html.haml b/app/views/streams/main_stream.html.haml index 6c9479bd26..3b40e59df2 100644 --- a/app/views/streams/main_stream.html.haml +++ b/app/views/streams/main_stream.html.haml @@ -57,5 +57,5 @@ = render 'shared/right_sections' - %a{id:"back-to-top", title:"#{t('layouts.application.back_to_top')}", href:"#"} + %a.back-to-top#back-to-top{title: "#{t('layouts.application.back_to_top')}", href: "#"} ⇧ diff --git a/app/views/tags/show.haml b/app/views/tags/show.haml index 8a29d2ca19..67ce267129 100644 --- a/app/views/tags/show.haml +++ b/app/views/tags/show.haml @@ -36,5 +36,5 @@ .col-lg-1.visible-lg#right-sidebar-fixed-sub-background - %a{id:"back-to-top", title:"#{t('layouts.application.back_to_top')}", href:"#"} + %a.back-to-top#back-to-top{title: "#{t('layouts.application.back_to_top')}", href: "#"} ⇧ -- GitLab