From 7102f06b829f6140f731ab1f4fc0ac14d6268e2f Mon Sep 17 00:00:00 2001 From: Sean Yesmunt Date: Tue, 9 Jul 2019 01:53:24 -0400 Subject: [PATCH] fix lbry/component style overrides in forms --- src/ui/page/settings/view.jsx | 18 ++++++++---------- src/ui/scss/component/_button.scss | 3 +-- src/ui/scss/component/_form-field.scss | 16 +++++++++++++++- static/locales/en.json | 2 +- 4 files changed, 25 insertions(+), 14 deletions(-) diff --git a/src/ui/page/settings/view.jsx b/src/ui/page/settings/view.jsx index b36f00549..81f8411df 100644 --- a/src/ui/page/settings/view.jsx +++ b/src/ui/page/settings/view.jsx @@ -173,16 +173,14 @@ class SettingsPage extends React.PureComponent {
-
- { - setDaemonSetting('download_dir', newDirectory); - }} - /> -

{__('LBRY downloads will be saved here.')}

- + { + setDaemonSetting('download_dir', newDirectory); + }} + /> +

{__('LBRY downloads will be saved here.')}

diff --git a/src/ui/scss/component/_button.scss b/src/ui/scss/component/_button.scss index f0d8f22ca..b60075c64 100644 --- a/src/ui/scss/component/_button.scss +++ b/src/ui/scss/component/_button.scss @@ -44,8 +44,7 @@ line-height: var(--button-height); border-radius: var(--button-radius); font-size: 1.1rem; - padding-top: 0; - padding-bottom: 0; + padding: 0 var(--spacing-medium); box-sizing: border-box; } diff --git a/src/ui/scss/component/_form-field.scss b/src/ui/scss/component/_form-field.scss index f8bddebba..763861992 100644 --- a/src/ui/scss/component/_form-field.scss +++ b/src/ui/scss/component/_form-field.scss @@ -1,5 +1,16 @@ @import '~@lbry/components/sass/form/_index.scss'; +// Reset lbry components style that turns buttons inside of forms black +form { + .button--primary, + [type='submit'] { + &:not(:hover), + &:hover { + @extend .button--primary; + } + } +} + textarea { &::placeholder { opacity: 0.4; @@ -223,7 +234,10 @@ fieldset-section { } } - .button { + .button, + // specificity needed because of @lbry/component rules + // @lbry/componentfixme + .button[type='submit']:not(:hover) { border-top-left-radius: 0; border-bottom-left-radius: 0; border-top-right-radius: var(--input-border-radius); diff --git a/static/locales/en.json b/static/locales/en.json index cc3e68b74..4be62f8a9 100644 --- a/static/locales/en.json +++ b/static/locales/en.json @@ -576,4 +576,4 @@ "Are you sure you want to remove this support?": "Are you sure you want to remove this support?", "These credits are permanently yours and can be removed at any time. Removing this support will reduce the claim's discoverability and return the LBC to your spendable balance.": "These credits are permanently yours and can be removed at any time. Removing this support will reduce the claim's discoverability and return the LBC to your spendable balance.", "The better your tags are, the easier it will be for people to discover your channel.": "The better your tags are, the easier it will be for people to discover your channel." -} \ No newline at end of file +}