diff --git a/web/modals/threads/color-picker.react.js b/web/modals/threads/color-picker.react.js deleted file mode 100644 index 8cd23e471..000000000 --- a/web/modals/threads/color-picker.react.js +++ /dev/null @@ -1,78 +0,0 @@ -// @flow - -import * as React from 'react'; -import { type ColorResult, ChromePicker } from 'react-color'; - -import css from '../../style.css'; - -type Props = { - +id: string, - +value: string, - +disabled: boolean, - +onChange: (hex: string) => void, -}; -type State = { - +pickerOpen: boolean, -}; - -class ColorPicker extends React.PureComponent { - constructor(props: Props) { - super(props); - this.state = { - pickerOpen: false, - }; - } - - render(): React.Node { - let picker = null; - if (this.state.pickerOpen && !this.props.disabled) { - picker = ( -
- -
- ); - } - const style = { backgroundColor: `#${this.props.value}` }; - return ( -
-
-
-
-
- {picker} -
- ); - } - - onPickerKeyDown: ( - event: SyntheticKeyboardEvent, - ) => void = event => { - if (event.key === 'Escape') { - this.setState({ pickerOpen: false }); - } - }; - - onChangeColor: (color: ColorResult) => void = color => { - this.props.onChange(color.hex.substring(1, 7)); - }; - - onClick: () => void = () => { - this.setState({ pickerOpen: true }); - }; - - onBlur: () => void = () => { - this.setState({ pickerOpen: false }); - }; -} - -export default ColorPicker; diff --git a/web/style.css b/web/style.css index 175336762..35db2e964 100644 --- a/web/style.css +++ b/web/style.css @@ -1,255 +1,218 @@ *, *:before, *:after { padding: 0; margin: 0; -ms-overflow-style: -ms-autohiding-scrollbar; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } html { height: 100%; font-size: 62.5%; } body { font-family: var(--font-stack); background: var(--bg); height: 100%; overflow: hidden; font-size: 1.6rem; } a { text-decoration: none; color: #2a5db0; cursor: pointer; } button { cursor: pointer; } img, iframe { display: block; } input[type='text'], input[type='password'], textarea { -webkit-appearance: none; -moz-appearance: none; -webkit-border-radius: 0; border: 1px solid #dddddd; border-radius: 1px; font-family: var(--font-stack); } button svg { vertical-align: top; } :global(#react-root) { display: flex; flex-direction: column; height: 100%; } div.layout { height: 100vh; display: grid; grid-template-columns: 244px repeat(12, 1fr); grid-template-rows: 65px calc(100vh - 65px); grid-template-areas: 'nav nav nav nav nav nav nav nav nav nav nav nav nav' 'sBar app app app app app app app app app app app app'; } header.header { background: var(--bg); z-index: 1; grid-area: nav; } div.main-header { height: 64px; background: var(--bg); display: flex; align-items: center; border-bottom: 1px solid var(--border-color); } div.main-header > .wordmark { color: var(--fg); padding-left: 92px; font-family: var(--font-logo); line-height: var(--line-height-text); font-weight: var(--semi-bold); font-size: var(--logo-font-22); margin-right: 40px; } .wordmark > a { color: inherit; } .electron-draggable { -webkit-app-region: drag; } .electron-non-draggable { -webkit-app-region: no-drag; } div.main-content-container { position: relative; grid-area: app; display: flex; overflow: hidden; } div.main-content { display: flex; flex: 1; overflow: hidden; } div.upper-right { position: absolute; top: 0; right: 0; padding: 15px 16px; } span.loading-indicator-loading { display: inline-block; } @keyframes loading-indicator-loading { from { transform: rotate(0deg); } to { transform: rotate(360deg); } } span.loading-indicator-loading-medium:after { content: ' '; display: block; width: 15px; height: 15px; border-radius: 50%; border: 3px solid #fff; border-color: #fff transparent #fff transparent; animation-name: loading-indicator-loading; animation-duration: 1.2s; animation-iteration-count: infinite; animation-timing-function: linear; } span.loading-indicator-loading-large:after { content: ' '; display: block; width: 25px; height: 25px; border-radius: 50%; border: 3px solid #fff; border-color: #fff transparent #fff transparent; animation-name: loading-indicator-loading; animation-duration: 1.2s; animation-iteration-count: infinite; animation-timing-function: linear; } span.loading-indicator-loading-small:after { content: ' '; display: block; width: 9px; height: 9px; border-radius: 50%; border: 2px solid #fff; border-color: #fff transparent #fff transparent; animation-name: loading-indicator-loading; animation-duration: 1.2s; animation-iteration-count: infinite; animation-timing-function: linear; } span.loading-indicator-black:after { border-color: #000 transparent #000 transparent; } span.loading-indicator-error { font-weight: bold; color: white; line-height: 0; } span.loading-indicator-error-black { font-weight: bold; color: red; line-height: 0; } .hidden { display: none; } .italic { font-style: italic; } span.page-loading { margin-top: 5px; margin-right: 12px; float: left; } span.page-error { margin: 15px; font-size: 42px; float: left; color: red; } -div.color-picker-container { - outline: none; - position: relative; -} -div.color-picker-button { - margin: 6px 3px; - overflow: hidden; - cursor: pointer; - padding: 4px; - display: inline-block; - border: solid 1px darkgray; - background: #eee; - color: #333; - vertical-align: middle; - border-radius: 3px; -} -div.color-picker-preview { - width: 25px; - height: 16px; - border: solid 1px #222; - margin-right: 5px; - float: left; - z-index: 0; -} -div.color-picker-down-symbol { - padding: 1px 0; - height: 16px; - line-height: 16px; - float: left; - font-size: 10px; -} -div.color-picker-selector { - position: absolute; - left: 4px; - top: 34px; -} - @media only screen and (-webkit-min-device-pixel-ratio: 2), only screen and (min--moz-device-pixel-ratio: 2), only screen and (-o-min-device-pixel-ratio: 2/1), only screen and (min-device-pixel-ratio: 2), only screen and (min-resolution: 320dpi), only screen and (min-resolution: 2dppx) { header.header, header.main-header, div.splash-header-container, div.splash-top-container, div.splash-bottom, div.calendar-filters-container { background: var(--bg); } } @media (hover: none) { div.splash-header-container, div.splash-top-container, div.splash-bottom { background-attachment: initial; } }