-
Notifications
You must be signed in to change notification settings - Fork 0
Style updates #1
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1,2 @@ | ||
| node_modules | ||
| .env |
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,22 +1,41 @@ | ||
| .Blockquote { | ||
| padding-left: 1.3rem; | ||
| margin-left: 2.6rem; | ||
| border-left: 6px solid #838383; | ||
| height: 3rem; | ||
| font-size: 1.2rem; | ||
| position: relative; | ||
| font-size: 1.6rem; | ||
| margin: 0; | ||
| display: flex; | ||
| flex-direction: row; | ||
| align-items: center; | ||
| margin: 1.7rem 0; | ||
| } | ||
|
|
||
| .Blockquote__text { | ||
| text-align: center; | ||
| font-style: oblique; | ||
| font-family: 'Merriweather'; | ||
| font-family: Raleway, sans-serif; | ||
| font-weight: 200; | ||
| margin: 20px auto; | ||
| padding: 14px; | ||
| position: relative; | ||
| border-top: 3px solid #d476d4; | ||
| border-bottom: 3px solid violet; | ||
| transform: rotate(-1.2deg); | ||
| } | ||
|
|
||
| .Blockquote__text::before { | ||
| font-style: initial; | ||
| content: '‟'; | ||
| font-size: 5rem; | ||
| position: absolute; | ||
| top: -2rem; | ||
| left: -2rem; | ||
| color: #cdcdcd; | ||
| } | ||
|
|
||
| .Blockquote::before { | ||
| .Blockquote__text::after { | ||
| font-style: initial; | ||
| content: '‟'; | ||
| font-size: 3.5rem; | ||
| font-size: 5rem; | ||
| position: absolute; | ||
| left: -2.5rem; | ||
| bottom: -2rem; | ||
| right: -2rem; | ||
| color: #cdcdcd; | ||
| transform: rotate(180deg); | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,31 +1,57 @@ | ||
| .Clickable { | ||
| line-height: 1.4; | ||
| font-weight: 700; | ||
| } | ||
|
|
||
| a.Clickable { | ||
| display: inline-block; /* prevents word break needed for background hover effect */ | ||
| color: inherit; | ||
| font-weight: bold; | ||
| text-decoration: none; | ||
| border-bottom: 1px solid; | ||
| transition: cubic-bezier(0.45, 1.02, 0.75, 0.92) 0.2s; | ||
| letter-spacing: 0.02rem; | ||
| padding: 0 1px; | ||
| border-bottom: 2px solid #ffc600; | ||
| letter-spacing: 0.05rem; | ||
| padding: 0 3px; | ||
| position: relative; | ||
| transition: color cubic-bezier(0.45, 1.02, 0.75, 0.92) 0.2s; | ||
| } | ||
|
|
||
| a::before { | ||
| transition: height cubic-bezier(0.45, 1.02, 0.75, 0.92) 0.2s; | ||
| content: ''; | ||
| height: 0; | ||
| position: absolute; | ||
| left: 0; | ||
| right: 0; | ||
| bottom: 0; | ||
| background-color: #ffc600; | ||
| z-index: -1; | ||
| } | ||
|
|
||
| a:hover::before { | ||
| height: 100%; | ||
| } | ||
|
|
||
| a.Clickable:hover { | ||
| color: #ff8811; | ||
| border-bottom-style: dashed; | ||
| color: #fff; | ||
| } | ||
|
|
||
| button.Clickable { | ||
| font-size: 0.7rem; | ||
| appearance: none; | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not sure if this is necessary - it's just telling the browser not to use system default styling - which is the default anyway. |
||
| background: #f7f7f7; | ||
| border: 1px solid black; | ||
| border-bottom-color: rgba(0, 0, 0, 0.7); | ||
| border-radius: 3px; | ||
| border: 1px solid #000000; | ||
| box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.075); | ||
| color: #838383; | ||
| cursor: pointer; | ||
| line-height: 1.2rem; | ||
| letter-spacing: 0.1rem; | ||
| margin: 5px 0 0 5px; | ||
| padding: 6px 15px 7px; | ||
| overflow: visible; | ||
| padding: 9px 15px 10px; | ||
| position: relative; | ||
| letter-spacing: 0.02rem; | ||
| text-align: center; | ||
| text-transform: uppercase; | ||
| user-select: none; | ||
| } | ||
|
|
||
| button.Clickable:hover { | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,61 @@ | ||
| import React, { Fragment } from 'react'; | ||
| import PropTypes from 'prop-types'; | ||
|
|
||
| import './styles.css'; | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Create an issue for styled components |
||
| import classnames from 'classnames'; | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Move up |
||
|
|
||
| const CountBadge = ({ | ||
| children, | ||
| hideCount, | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| isAttached, | ||
| fillColor, | ||
| strokeColor, | ||
| size, | ||
| }) => { | ||
| const count = | ||
| children > 99 ? ( | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Magic numbers. Replace with |
||
| <Fragment> | ||
| 99<sup>+</sup> | ||
| </Fragment> | ||
| ) : ( | ||
| children | ||
| ); | ||
| return ( | ||
| <div | ||
| className={classnames([ | ||
| 'CountBadge', | ||
| { | ||
| 'CountBadge__is-attached': isAttached, | ||
| }, | ||
| ])} | ||
| style={{ | ||
| color: strokeColor, | ||
| backgroundColor: fillColor, | ||
| fontSize: size / 2, | ||
| height: size, | ||
| width: size, | ||
| }} | ||
| title={children} | ||
| > | ||
| {hideCount ? null : count} | ||
| </div> | ||
| ); | ||
| }; | ||
|
|
||
| CountBadge.propTypes = { | ||
| hideCount: PropTypes.bool, | ||
| children: PropTypes.string.isRequired, | ||
| strokeColor: PropTypes.string, | ||
| fillColor: PropTypes.string, | ||
| size: PropTypes.number, | ||
| }; | ||
|
|
||
| CountBadge.defaultProps = { | ||
| hideCount: false, | ||
| isAttached: false, | ||
| strokeColor: '#ffffff', | ||
| fillColor: '#d01c1c', | ||
| size: 24, | ||
| }; | ||
|
|
||
| export default CountBadge; | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| .CountBadge { | ||
| align-items: center; | ||
| border-radius: 100%; | ||
| display: flex; | ||
| font-weight: bold; | ||
| justify-content: center; | ||
| margin: 1px; | ||
| position: relative; | ||
| } | ||
|
|
||
| .CountBadge__is-attached { | ||
| position: absolute; | ||
| top: 0; | ||
| right: 0; | ||
| transform: translate(55%, -55%); | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I feel that this relies on the outer element having a position relative which doesn't encapsulate this component - it creates a dependency on the outside world rather than being atomic. Options:
Obviously option 2 will have a impact on performance, so should consider looking at stifling re-renders. For now, let's remove this feature and open an issue to investigate and add. |
||
| } | ||
|
|
||
| .CountBadge::after { | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we leave some more comments in the CSS as to what the intent of the pseudo class is. |
||
| border-radius: 100%; | ||
| border: 0.18em solid; | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we need an explicit |
||
| bottom: -1px; /* -1px on position to tackle background colour fuzzing */ | ||
| content: ''; | ||
| left: -1px; | ||
| position: absolute; | ||
| right: -1px; | ||
| top: -1px; | ||
| } | ||
|
|
||
| sup { | ||
| transform: translateY(-20%); | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,13 @@ | ||
| .H { | ||
| font-family: 'Montserrat'; | ||
| font-family: Raleway, sans-serif; | ||
| line-height: 2.5rem; | ||
| font-weight: 400; | ||
| text-transform: uppercase; | ||
| letter-spacing: 1px; | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. rem? |
||
| margin: 1.25rem 0; | ||
| /* font-family: 'Montserrat', sans-serif; | ||
| line-height: 1.5; | ||
| font-weight: 800; | ||
| font-weight: 800; */ | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Clean up comment |
||
| } | ||
|
|
||
| .H1 { | ||
|
|
@@ -15,12 +21,12 @@ | |
| } | ||
|
|
||
| .H3 { | ||
| font-size: 1rem; | ||
| font-size: 1.2rem; | ||
| margin: 0 0 20px 0; | ||
| } | ||
|
|
||
| .H4 { | ||
| font-size: 0.8rem; | ||
| font-size: 1rem; | ||
| margin: 0 0 20px 0; | ||
| } | ||
|
|
||
|
|
@@ -29,7 +35,7 @@ | |
| position: relative; | ||
| } | ||
|
|
||
| .H__is-title::after { | ||
| .H__is-title::before { | ||
| content: ''; | ||
| position: absolute; | ||
| height: 3px; | ||
|
|
@@ -40,18 +46,23 @@ | |
| } | ||
|
|
||
| .H__subtitle { | ||
| color: #555; | ||
| line-height: 1; | ||
| font-weight: 400; | ||
| font-size: 0.75rem; | ||
| color: #999; | ||
| font-weight: 700; | ||
| letter-spacing: 3px; | ||
| line-height: 1.45rem; | ||
| margin: 0; | ||
| text-transform: uppercase; | ||
| display: block; | ||
| } | ||
|
|
||
| .H1 > .H__subtitle, | ||
| .H2 > .H__subtitle { | ||
| font-size: 0.6em; | ||
| font-size: 0.9rem; | ||
| } | ||
|
|
||
| .H3 > .H__subtitle, | ||
| .H4 > .H__subtitle { | ||
| font-size: 0.8em; | ||
| font-size: 0.7rem; | ||
| line-height: 1rem; | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,7 @@ | ||
| .HR { | ||
| width: 90%; | ||
| border: none; | ||
| background-color: #222; | ||
| height: 1px; | ||
| background-color: #ffc600; | ||
| height: 2px; | ||
| transform: rotate(-0.4deg); | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,5 @@ | ||
| .P { | ||
| font-family: Raleway, sans-serif; | ||
| font-weight: 400; | ||
| line-height: 1.5; | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/* bottom border grows to fill entire background */