Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix some styling on the showcase page #7014

Merged
merged 5 commits into from
Aug 13, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 28 additions & 3 deletions www/src/views/shared/styles.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import { options, /* rhythm, scale, */ rhythm } from "../../utils/typography"
import typography, { options, rhythm } from "../../utils/typography"
import presets, { colors } from "../../utils/presets"
import { style } from "glamor"
import hex2rgba from "hex2rgba"

const { curveDefault, speedDefault } = presets.animation

const styles = {
featuredSitesCard: style({
display: `flex`,
Expand Down Expand Up @@ -94,9 +96,9 @@ const styles = {
sticky: {
paddingTop: rhythm(options.blockMarginBottom),
position: `sticky`,
top: 0,
top: `calc(${presets.bannerHeight} - 1px)`,
[presets.Desktop]: {
top: `calc(${presets.headerHeight} - 1px)`,
top: `calc(${presets.headerHeight} + ${presets.bannerHeight} - 1px)`,
},
},
scrollbar: {
Expand Down Expand Up @@ -132,6 +134,29 @@ const styles = {
borderBottom: `none !important`, // i know i know
boxShadow: `none !important`, // but people really want this
},
searchInput: {
appearance: `none`,
backgroundColor: `transparent`,
border: 0,
borderRadius: presets.radiusLg,
color: colors.gatsby,
paddingTop: rhythm(1 / 8),
paddingRight: rhythm(1 / 4),
paddingBottom: rhythm(1 / 8),
paddingLeft: rhythm(1),
overflow: `hidden`,
fontFamily: typography.options.headerFontFamily.join(`,`),
transition: `width ${speedDefault} ${curveDefault}, background-color ${speedDefault} ${curveDefault}`,
width: `6.8rem`,
"&::placeholder": {
color: colors.lilac,
},
"&:focus": {
outline: "none",
width: `9rem`,
background: colors.ui.light,
},
},
}

export default styles
6 changes: 5 additions & 1 deletion www/src/views/showcase/collapsible-filter-list.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,11 @@ const CollapsibleFilterList = ({
marginRight: 8,
}}
>
{filters.includes(c) ? <MdCheckbox /> : <MdCheckboxBlank />}
{filters.includes(c) ? (
<MdCheckbox style={{ verticalAlign: `-0.125em` }} />
) : (
<MdCheckboxBlank style={{ verticalAlign: `-0.125em` }} />
)}
</div>
<div
css={{
Expand Down
6 changes: 4 additions & 2 deletions www/src/views/showcase/filtered-showcase.js
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ class FilteredShowcase extends Component {
<label css={{ position: `relative` }}>
<input
css={{ ...styles.searchInput }}
type="text"
type="search"
value={this.state.search}
onChange={e =>
this.setState({
Expand Down Expand Up @@ -211,7 +211,9 @@ class FilteredShowcase extends Component {
}}
>
Load More
<MdArrowDownward style={{ marginLeft: 4 }} />
<MdArrowDownward
style={{ marginLeft: 4, verticalAlign: `sub` }}
/>
</button>
)}
</div>
Expand Down