Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Commit

Permalink
fix(ui): lighten shadows in light theme
Browse files Browse the repository at this point in the history
fix #2680
  • Loading branch information
mrfelton committed Aug 5, 2019
1 parent 029bcdc commit 90fcc84
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 9 deletions.
6 changes: 3 additions & 3 deletions renderer/themes/base.js
@@ -1,10 +1,10 @@
export const space = [0, 4, 8, 16, 32, 45, 72, 108] export const space = [0, 4, 8, 16, 32, 45, 72, 108]


export const shadows = { export const shadows = {
xs: '0 2px 4px 0 rgba(0, 0, 0, 0.5)', xs: '0 2px 3px 0 rgba(0, 0, 0, 0.3)',
s: ' 0 3px 4px 0 rgba(0, 0, 0, 0.3)', s: '0 2px 4px 0 rgba(0, 0, 0, 0.4)',
m: '0 2px 24px 0 rgba(0, 0, 0, 0.5)', m: '0 2px 24px 0 rgba(0, 0, 0, 0.5)',
l: '0 20px 70px rgba(0, 0, 0, 0.55)', l: '0 20px 70px 0 rgba(0, 0, 0, 0.6)',
} }


export const palette = { export const palette = {
Expand Down
2 changes: 1 addition & 1 deletion renderer/themes/dark/index.js
@@ -1,4 +1,4 @@
import createThemeVariant from '../util' import createThemeVariant from '../util'
import colors from './colors' import colors from './colors'


export default createThemeVariant('dark', colors) export default createThemeVariant('dark', { colors })
5 changes: 4 additions & 1 deletion renderer/themes/light/index.js
@@ -1,4 +1,7 @@
import createThemeVariant from '../util' import createThemeVariant from '../util'
import colors from './colors' import colors from './colors'
import shadows from './shadows'


export default createThemeVariant('light', colors) const theme = createThemeVariant('light', { colors, shadows })

export default theme
3 changes: 3 additions & 0 deletions renderer/themes/light/shadows.js
@@ -0,0 +1,3 @@
export default {
m: '0 2px 12px 0 rgba(0, 0, 0, 0.2)',
}
9 changes: 7 additions & 2 deletions renderer/themes/util.js
@@ -1,7 +1,10 @@
import { tint } from 'polished' import { tint } from 'polished'
import merge from 'lodash/merge'
import base from './base' import base from './base'


const createThemeVariant = (name, colors) => { const createThemeVariant = (name, overrides = {}) => {
const { colors, ...rest } = overrides

const buttons = { const buttons = {
normal: { normal: {
backgroundColor: colors.tertiaryColor, backgroundColor: colors.tertiaryColor,
Expand Down Expand Up @@ -82,14 +85,16 @@ const createThemeVariant = (name, colors) => {
}, },
} }


return { const theme = {
name, name,
...base, ...base,
colors, colors,
buttons, buttons,
cards, cards,
messages, messages,
} }

return merge({}, theme, rest)
} }


export default createThemeVariant export default createThemeVariant
3 changes: 1 addition & 2 deletions stories/_general/color.stories.js
Expand Up @@ -11,9 +11,8 @@ const Swatch = ({ name, color }) => (
<Element> <Element>
<Flex mb={2}> <Flex mb={2}>
<Card <Card
// bg={color}
borderRadius={8} borderRadius={8}
boxShadow="0 2px 6px rgba(0, 0, 0, 0.3)" boxShadow="s"
css={` css={`
background: ${color}; background: ${color};
height: 50px; height: 50px;
Expand Down

0 comments on commit 90fcc84

Please sign in to comment.