Skip to content

Commit

Permalink
Reduce specificity of checked Pill selector, and... (#122)
Browse files Browse the repository at this point in the history
* Fixes #100

* Fix issue with Avatar test by making size optional, also makes button inline-flex by default to improve initial behavior of Addons.
  • Loading branch information
pixelbandito authored Oct 21, 2019
1 parent d4f9eac commit 1f7752d
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
3 changes: 2 additions & 1 deletion src/components/Button/Addon/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,12 @@ const Addon = ({ className, size, ...passedProps }) => (

Addon.propTypes = {
className: PropTypes.string,
size: PropTypes.oneOf(['sm', 'md', 'lg']).isRequired,
size: PropTypes.oneOf(['sm', 'md', 'lg']),
};

Addon.defaultProps = {
className: '',
size: 'md',
};

Addon.displayName = 'ButtonAddon';
Expand Down
2 changes: 2 additions & 0 deletions src/components/Button/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
font-size: var(--rvr-font-size-md);
line-height: var(--rvr-line-height-sm);
transition: 0.2s linear background-color, 0.2s linear border-color, 0.2s linear color;
display: inline-flex;
flex-flow: row nowrap;
align-content: center;
}

Expand Down
14 changes: 7 additions & 7 deletions src/components/Pill/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@
color: var(--rvr-white);
}

.Pill.checked {
.checked {
background-color: #ebfffe;
border-color: var(--rvr-light-teal);
color: var(--rvr-gray-80);
box-shadow: none;
}

.Pill.checked:hover {
.checked:hover {
background-color: #d5f5f3;
border-color: var(--rvr-light-teal-hover);
color: var(--rvr-gray-90);
Expand Down Expand Up @@ -62,14 +62,14 @@
margin-inline-start: 0;
}

.Pill:hover .actionInline {
color: var(--rvr-white);
.checked .actionInline {
color: var(--rvr-light-teal);
}

.Pill.checked .actionInline {
color: var(--rvr-light-teal);
.Pill:hover .actionInline {
color: var(--rvr-white);
}

.Pill.checked:hover .actionInline {
.checked:hover .actionInline {
color: var(--rvr-light-teal-hover);
}

0 comments on commit 1f7752d

Please sign in to comment.