diff --git a/src/components/Modal/Modal.css b/src/components/Modal/Modal.css index aea8de65..a8b60c3e 100644 --- a/src/components/Modal/Modal.css +++ b/src/components/Modal/Modal.css @@ -27,27 +27,26 @@ overflow: hidden; } -/* Header section for Modal */ -.header { - display: flex; - flex-direction: row; - justify-content: flex-end; -} - -.title { - margin: 24px; - flex-grow: 1; -} - .close { + /* Position inside modal */ + position: absolute; + top: 0; + right: 0; + + /* Safari didn't know how to baseline-align svg icon and text */ display: flex; - align-items: baseline; + align-items: flex-start; width: auto; - background-color: transparent; + + /* Sizing (touch area) */ padding: 24px; - color: var(--matterColor); border: 0; - composes: h6Font from '../../marketplace.css'; + + /* Colors */ + background-color: transparent; + color: var(--matterColor); + + cursor: pointer; &:enabled:hover { background-color: transparent; @@ -62,8 +61,16 @@ } } +.closeText { + /* Font */ + composes: h6Font from '../../marketplace.css'; +} + .closeIcon { + display: inline-block; margin-left: 12px; + padding: 6px 0 6px; + box-sizing: content-box; } .content { diff --git a/src/components/Modal/Modal.js b/src/components/Modal/Modal.js index cb5ab5d1..0b4f0c94 100644 --- a/src/components/Modal/Modal.js +++ b/src/components/Modal/Modal.js @@ -46,24 +46,14 @@ export class ModalComponent extends Component { intl, isClosedClassName, isOpen, - title, } = this.props; const closeModalMessage = intl.formatMessage({ id: 'Modal.closeModal' }); - const modalTitle = title ?
Description: {description}
: null; return ( -No examples with filter: {componentName}/{exampleName}
; diff --git a/src/containers/StyleguidePage/Typography.example.js b/src/containers/StyleguidePage/Typography.example.js index ee074543..9072c8ce 100644 --- a/src/containers/StyleguidePage/Typography.example.js +++ b/src/containers/StyleguidePage/Typography.example.js @@ -30,72 +30,70 @@ const Fonts = () => { const heroTitleFontStyling = `Mobile styles: font-size: 48px; line-height: 54px; - padding: 5px 0 1px; + padding: 1px 0 5px; Desktop styles: font-size: 90px; line-height: 96px; - padding: 0;`; + padding: 1px 0 7px;`; const h1FontStyling = `Mobile styles: font-size: 30px; line-height: 36px; - padding: 3.5px 0 2.5px; Desktop styles: font-size: 48px; - line-height: 56px; - padding: 6px 0 2px;`; + line-height: 56px;`; const h2FontStyling = `Mobile styles: font-size: 24px; line-height: 30px; - padding: 3px 0 3px; + padding: 5px 0 1px; Desktop styles: font-size: 24px; line-height: 32px; - padding: 4px 0 4px;`; + padding: 5px 0 3px;`; const h3FontStyling = `Mobile styles: font-size: 20px; line-height: 24px; - padding: 2px 0 4px; + padding: 4px 0 2px; Desktop styles: font-size: 20px; line-height: 24px; - padding: 2px 0 6px;`; + padding: 4px 0 4px;`; const h4FontStyling = `Mobile styles: font-size: 16px; line-height: 24px; - padding: 3.5px 0 2.5px; + padding: 0; Desktop styles: font-size: 16px; line-height: 24px; - padding: 4px 0 4px;`; + padding: 5px 0 3px;`; const h5FontStyling = `Mobile styles: font-size: 14px; line-height: 18px; - padding: 1.5px 0 4.5px; + padding: 4px 0 2px; Desktop styles: font-size: 14px; - line-height: 18px; - padding: 7px 0 1px;`; + line-height: 16px; + padding: 2px 0 6px;`; const h6FontStyling = `Mobile styles: font-size: 12px; line-height: 18px; - padding: 2px 0 4px; + padding: 4px 0 2px; Desktop styles: font-size: 12px; - line-height: 18px; - padding: 6px 0 2px;`; + line-height: 16px; + padding: 2px 0 6px;`; const bodyFontStyling = `Mobile styles: font-size: 18px; diff --git a/src/containers/Topbar/MenuIcon.js b/src/containers/Topbar/MenuIcon.js index dadd5eff..bea4ee0d 100644 --- a/src/containers/Topbar/MenuIcon.js +++ b/src/containers/Topbar/MenuIcon.js @@ -11,14 +11,14 @@ const MenuIcon = props => { ); diff --git a/src/containers/Topbar/Topbar.css b/src/containers/Topbar/Topbar.css index 69e65c8b..1bc396d3 100644 --- a/src/containers/Topbar/Topbar.css +++ b/src/containers/Topbar/Topbar.css @@ -1,5 +1,10 @@ @import '../../marketplace.css'; +:root { + --topbarHeight: 60px; + --logoHeight: 25px; +} + .root { width: 100%; } @@ -8,14 +13,13 @@ /* Size */ width: 100%; - height: 60px; + height: var(--topbarHeight); /* Layout for child components */ display: flex; flex-direction: row; justify-content: space-between; align-items: center; - padding: 0 12px; /* fill */ background-color: var(--matterColorLight); @@ -29,7 +33,8 @@ } .home { - padding: 18px; + display: flex; + padding: calc((var(--topbarHeight) - var(--logoHeight)) / 2) 24px; } .logoutButton { @@ -37,11 +42,35 @@ } /* Child component's size (and positioning) should be given here */ -.hamburgerMenu, +.menu, .searchMenu { display: flex; - align-items: center; - width: 44px; + width: 66px; + padding: 12px 24px; + border-width: 0px; + background-color: transparent; + + /* Font */ + composes: h5Font from '../../marketplace.css'; + color: var(--matterColor); + + /* Hovers */ + &:enabled { + cursor: pointer; + } + &:enabled:hover, + &:enabled:active { + background-color: transparent; + } + &:disabled { + background-color: transparent; + cursor: auto; + } +} + +.menuIcon, +.searchMenuIcon { + margin: 9px 0; } .desktop { @@ -61,6 +90,7 @@ .searchContainer { position: relative; height: 100%; + margin-top: 72px; } .mobileHelp { @@ -70,7 +100,7 @@ /* Absolute position to avoid affecting the layout of the autocomplete predictions list */ position: absolute; - top: 115px; + top: 114px; /* Pull text behind search suggestions */ z-index: -1; diff --git a/src/containers/Topbar/Topbar.js b/src/containers/Topbar/Topbar.js index 33956431..bef39162 100644 --- a/src/containers/Topbar/Topbar.js +++ b/src/containers/Topbar/Topbar.js @@ -4,7 +4,7 @@ import { connect } from 'react-redux'; import { FormattedMessage, intlShape, injectIntl } from 'react-intl'; import { pickBy } from 'lodash'; import { logout, authenticationInProgress } from '../../ducks/Auth.duck'; -import { FlatButton, Modal, NamedLink, TopbarDesktop, TopbarMobileMenu } from '../../components'; +import { Button, Modal, NamedLink, TopbarDesktop, TopbarMobileMenu } from '../../components'; import { TopbarSearchForm } from '../../containers'; import { withFlattenedRoutes } from '../../util/contextHelpers'; import { parse, stringify } from '../../util/urlHelpers'; @@ -124,15 +124,15 @@ class TopbarComponent extends Component { return (