Skip to content
This repository has been archived by the owner on Oct 6, 2020. It is now read-only.

Commit

Permalink
fix(Label): Darken inactive label color
Browse files Browse the repository at this point in the history
  • Loading branch information
kylealwyn committed Sep 18, 2019
1 parent 333abae commit d5a52ac
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
3 changes: 2 additions & 1 deletion src/Form/Label.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,10 @@ const Label = createComponent({
line-height: 14px;
left: 9px;
font-size: ${isFloating ? 12 : 16}px;
font-weight: 400;
top: ${isFloating ? '6px' : '50%'};
transform: ${isFloating ? 'none' : 'translateY(-50%)'};
color: ${theme.colors.greyDarker};
color: ${theme.colors.greyDarkest};
user-select: none;
&:hover {
Expand Down
10 changes: 4 additions & 6 deletions src/Form/Select.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { createComponent } from '../utils';
const SelectContainer = createComponent({
name: 'SelectContainer',
as: Flex,
style: ({ theme, value }) => css`
style: ({ theme }) => css`
background: white;
border: 1px solid ${theme.colors.greyLight};
height: 48px;
Expand All @@ -25,10 +25,6 @@ const SelectContainer = createComponent({
font-family: inherit;
font-size: ${theme.typography.fontSize}px;
vertical-align: middle;
select {
color: ${value ? theme.typography.color : theme.colors.greyDarker};
}
`,
});

Expand All @@ -43,14 +39,16 @@ const IconContainer = styled(Flex)`
const SelectInput = createComponent({
name: 'Select',
tag: 'select',
style: ({ theme, isFloating }) => css`
style: ({ theme, value, isFloating }) => css`
position: relative;
z-index: 2;
padding: 0 8px;
outline: none;
width: 100%;
font-size: ${theme.typography.fontSize}px;
font-family: inherit;
background: transparent;
color: ${value ? theme.typography.color : theme.colors.greyDarkest};
border: none;
-webkit-appearance: none;
Expand Down

0 comments on commit d5a52ac

Please sign in to comment.