From cab8c01833d55e6826405df8fa5b97bb950c3ab6 Mon Sep 17 00:00:00 2001 From: Steven Evans Date: Mon, 16 Jul 2018 10:38:14 -0400 Subject: [PATCH] [refactor] Introducing the "border-radius" SCSS mixin --- css/_mixins.scss | 5 +++++ css/companymanagement.scss | 2 ++ css/interactivetutorial.scss | 7 ++++--- css/menupages.scss | 6 +++--- css/missions.scss | 5 ++--- css/popupboxes.scss | 9 +++------ css/styles.scss | 6 +++--- css/workinprogress.scss | 5 ++--- 8 files changed, 24 insertions(+), 21 deletions(-) create mode 100644 css/_mixins.scss diff --git a/css/_mixins.scss b/css/_mixins.scss new file mode 100644 index 000000000..21ca5fce4 --- /dev/null +++ b/css/_mixins.scss @@ -0,0 +1,5 @@ +@mixin borderRadius($property) { + -webkit-border-radius: $property; + -moz-border-radius: $property; + border-radius: $property; +} diff --git a/css/companymanagement.scss b/css/companymanagement.scss index 8276cf5cb..11f9584cd 100644 --- a/css/companymanagement.scss +++ b/css/companymanagement.scss @@ -1,3 +1,5 @@ +@import "mixins"; + #cmpy-mgmt-container p, #cmpy-mgmt-container a, #cmpy-mgmt-container div { diff --git a/css/interactivetutorial.scss b/css/interactivetutorial.scss index 095a626c8..0e4bd8456 100644 --- a/css/interactivetutorial.scss +++ b/css/interactivetutorial.scss @@ -1,3 +1,5 @@ +@import "mixins"; + /* interactivetutorial.css */ #interactive-tutorial-wrapper { position: relative; @@ -31,12 +33,11 @@ #interactive-tutorial-exit, #interactive-tutorial-next, #interactive-tutorial-back { + @include borderRadius(12px); + color: #aaa; font-size: 20px; font-weight: bold; - -webkit-border-radius: 12px; - -moz-border-radius: 12px; - border-radius: 12px; -moz-box-shadow: 1px 1px 3px #000; -webkit-box-shadow: 1px 1px 3px #000; box-shadow: 1px 1px 3px #000; diff --git a/css/menupages.scss b/css/menupages.scss index 9960d4a90..fd9aea545 100644 --- a/css/menupages.scss +++ b/css/menupages.scss @@ -1,3 +1,4 @@ +@import "mixins"; /* CSS for different main menu pages, such as character info, script editor, etc (but excluding terminal which has its own page) */ @@ -260,12 +261,11 @@ } .active-scripts-button { + @include borderRadius(12px); + color: #aaa; font-size: 16px; font-weight: bold; - -webkit-border-radius: 12px; - -moz-border-radius: 12px; - border-radius: 12px; -moz-box-shadow: 1px 1px 3px #000; -webkit-box-shadow: 1px 1px 3px #000; box-shadow: 1px 1px 3px #000; diff --git a/css/missions.scss b/css/missions.scss index 6a958ac12..33cb170d3 100644 --- a/css/missions.scss +++ b/css/missions.scss @@ -1,3 +1,4 @@ +@import "mixins"; /* css for Missions */ /* Hacking missions */ @@ -56,11 +57,9 @@ } .hack-mission-cpu-node { + @include borderRadius(50%); width: 100%; height: 100%; - -moz-border-radius: 50%; - -webkit-border-radius: 50%; - border-radius: 50%; } .hack-mission-firewall-node { diff --git a/css/popupboxes.scss b/css/popupboxes.scss index 2b92cdd33..86e293dc2 100644 --- a/css/popupboxes.scss +++ b/css/popupboxes.scss @@ -1,3 +1,4 @@ +@import "mixins"; /* Pop-up boxes */ .popup-box-container { display: none; /* Hidden by default */ @@ -74,13 +75,11 @@ } .dialog-box-close-button { + @include borderRadius(12px); float: right; color: #aaa; font-size: 20px; font-weight: bold; - -webkit-border-radius: 12px; - -moz-border-radius: 12px; - border-radius: 12px; -moz-box-shadow: 1px 1px 3px #000; -webkit-box-shadow: 1px 1px 3px #000; box-shadow: 1px 1px 3px #000; @@ -155,15 +154,13 @@ } #game-options-close-button { + @include borderRadius(12px); color: #aaa; float: right; margin: 4px; padding: 4px; font-size: 20px; font-weight: bold; - -webkit-border-radius: 12px; - -moz-border-radius: 12px; - border-radius: 12px #fff; -moz-box-shadow: 1px 1px 3px #000; -webkit-box-shadow: 1px 1px 3px #000; box-shadow: 1px 1px 3px #000; diff --git a/css/styles.scss b/css/styles.scss index b8b320957..aed204eae 100644 --- a/css/styles.scss +++ b/css/styles.scss @@ -1,3 +1,4 @@ +@import "mixins"; :root{ --my-font-color: #6f3; --my-background-color: #000; @@ -446,12 +447,11 @@ a:link, a:visited { #character-overview-save-button, #character-overview-options-button { + @include borderRadius(12px); + color: #aaa; font-size: 14px; font-weight: bold; - -webkit-border-radius: 12px; - -moz-border-radius: 12px; - border-radius: 12px; -moz-box-shadow: 1px 1px 3px #000; -webkit-box-shadow: 1px 1px 3px #000; box-shadow: 1px 1px 3px #000; diff --git a/css/workinprogress.scss b/css/workinprogress.scss index ed922ee65..0917ff915 100644 --- a/css/workinprogress.scss +++ b/css/workinprogress.scss @@ -1,3 +1,4 @@ +@import "mixins"; /* Both Work in progress and BitNode stuff */ .generic-fullscreen-container { color: var(--my-font-color); @@ -16,15 +17,13 @@ } #work-in-progress-cancel-button { + @include borderRadius(12px); color: #aaa; float: left; font-size: 20px; font-weight: bold; - -webkit-border-radius: 12px; - -moz-border-radius: 12px; margin: 10px; padding: 5px; - border-radius: 12px; border: 3px solid #fff; -moz-box-shadow: 1px 1px 3px #000; -webkit-box-shadow: 1px 1px 3px #000;