Move style code to CSS

This commit is contained in:
Lukas Martinelli 2017-01-10 21:28:30 +01:00
parent 2426117233
commit 4a75b0381b
29 changed files with 318 additions and 221 deletions

View file

@ -25,51 +25,20 @@ class AppLayout extends React.Component {
} }
render() { render() {
return <div style={{ return <div className="maputnik-layout">
fontFamily: theme.fontFamily,
color: theme.color,
fontWeight: 300
}}>
{this.props.toolbar} {this.props.toolbar}
<div style={{ <div className="maputnik-layout-list">
position: 'fixed',
bottom: 0,
height: "100%",
top: 40,
left: 0,
zIndex: 1,
width: 200,
overflow: "hidden",
backgroundColor: colors.black
}}>
<ScrollContainer> <ScrollContainer>
{this.props.layerList} {this.props.layerList}
</ScrollContainer> </ScrollContainer>
</div> </div>
<div style={{ <div className="maputnik-layout-drawer">
position: 'fixed',
bottom: 0,
height: "100%",
top: 40,
left: 200,
zIndex: 1,
width: 350,
backgroundColor: colors.black
}}>
<ScrollContainer> <ScrollContainer>
{this.props.layerEditor} {this.props.layerEditor}
</ScrollContainer> </ScrollContainer>
</div> </div>
{this.props.map} {this.props.map}
{this.props.bottom && <div style={{ {this.props.bottom && <div className="maputnik-layout-bottom">
position: 'fixed',
height: 50,
bottom: 0,
left: 550,
zIndex: 1,
width: '100%',
backgroundColor: colors.black
}}>
{this.props.bottom} {this.props.bottom}
</div> </div>
} }

View file

@ -11,17 +11,8 @@ class Button extends React.Component {
render() { render() {
return <a return <a
onClick={this.props.onClick} onClick={this.props.onClick}
style={{ className="maputnik-button"
cursor: 'pointer', style={this.props.style}>
backgroundColor: colors.midgray,
color: colors.lowgray,
fontSize: fontSizes[5],
padding: margins[1],
userSelect: 'none',
borderRadius: 2,
boxSizing: 'border-box',
...this.props.style,
}}>
{this.props.children} {this.props.children}
</a> </a>
} }

View file

@ -1,15 +1,7 @@
import React from 'react' import React from 'react'
const ScrollContainer = (props) => { const ScrollContainer = (props) => {
return <div style={{ return <div className="maputnik-scroll-container">
overflowX: "visible",
overflowY: "scroll",
bottom:0,
left:0,
right:0,
top:1,
position: "absolute",
}}>
{props.children} {props.children}
</div> </div>
} }

View file

@ -30,22 +30,14 @@ const IconText = props => <span style={{ paddingLeft: margins[0] }}>
{props.children} {props.children}
</span> </span>
const actionStyle = {
display: "inline-block",
padding: 10,
fontSize: fontSizes[4],
cursor: "pointer",
color: colors.white,
textDecoration: 'none',
}
const ToolbarLink = props => <a const ToolbarLink = props => <a
className='maputnik-toolbar-link'
href={props.href} href={props.href}
target={"blank"} target={"blank"}
style={{ style={{
...actionStyle,
...props.style, ...props.style,
}}> }}
>
{props.children} {props.children}
</a> </a>
@ -54,20 +46,12 @@ class ToolbarAction extends React.Component {
onClick: React.PropTypes.func.isRequired, onClick: React.PropTypes.func.isRequired,
} }
constructor(props) {
super(props)
this.state = { hover: false }
}
render() { render() {
return <a return <a
className='maputnik-toolbar-action'
onClick={this.props.onClick} onClick={this.props.onClick}
onMouseOver={e => this.setState({hover: true})}
onMouseOut={e => this.setState({hover: false})}
style={{ style={{
...actionStyle,
...this.props.style, ...this.props.style,
backgroundColor: this.state.hover ? colors.gray : null,
}}> }}>
{this.props.children} {this.props.children}
</a> </a>
@ -116,15 +100,7 @@ export default class Toolbar extends React.Component {
} }
render() { render() {
return <div style={{ return <div className='maputnik-toolbar'>
position: "fixed",
height: 40,
width: '100%',
zIndex: 100,
left: 0,
top: 0,
backgroundColor: colors.black
}}>
<SettingsModal <SettingsModal
mapStyle={this.props.mapStyle} mapStyle={this.props.mapStyle}
onStyleChanged={this.props.onStyleChanged} onStyleChanged={this.props.onStyleChanged}

View file

@ -58,9 +58,10 @@ class ColorField extends React.Component {
render() { render() {
const offset = this.calcPickerOffset() const offset = this.calcPickerOffset()
const picker = <div const picker = <div
className="maputnik-color-picker-offset"
style={{ style={{
position: 'fixed', position: 'fixed',
zIndex: 1, zIndex: 1,
left: offset.left, left: offset.left,
top: offset.top, top: offset.top,
}}> }}>
@ -69,6 +70,7 @@ class ColorField extends React.Component {
onChange={c => this.props.onChange(formatColor(c))} onChange={c => this.props.onChange(formatColor(c))}
/> />
<div <div
className="maputnik-color-picker-offset"
onClick={this.togglePicker.bind(this)} onClick={this.togglePicker.bind(this)}
style={{ style={{
zIndex: -1, zIndex: -1,
@ -81,18 +83,13 @@ class ColorField extends React.Component {
/> />
</div> </div>
return <div style={{ return <div className="maputnik-color-wrapper">
position: 'relative',
display: 'inline',
}}>
{this.state.pickerOpened && picker} {this.state.pickerOpened && picker}
<input <input
className="maputnik-color"
ref="colorInput" ref="colorInput"
onClick={this.togglePicker.bind(this)} onClick={this.togglePicker.bind(this)}
style={{ style={this.props.style}
...input.input,
...this.props.style
}}
name={this.props.name} name={this.props.name}
placeholder={this.props.default} placeholder={this.props.default}
value={this.props.value ? this.props.value : ""} value={this.props.value ? this.props.value : ""}

View file

@ -22,15 +22,14 @@ export default class DocLabel extends React.Component {
render() { render() {
return <label return <label
style={{ style={{
...input.label, ...this.props.style
position: 'relative',
verticalAlign: 'top',
...this.props.style,
}} }}
className="maputnik-doc-wrapper"
> >
<span <span
onMouseOver={e => this.setState({showDoc: true})} onMouseOver={e => this.setState({showDoc: true})}
onMouseOut={e => this.setState({showDoc: false})} onMouseOut={e => this.setState({showDoc: false})}
className="maputnik-doc-target"
style={{ style={{
cursor: 'help', cursor: 'help',
...this.props.cursorTargetStyle, ...this.props.cursorTargetStyle,
@ -48,7 +47,9 @@ export default class DocLabel extends React.Component {
width: 120, width: 120,
display: this.state.showDoc ? null : 'none', display: this.state.showDoc ? null : 'none',
zIndex: 3, zIndex: 3,
}}> }}
className="maputnik-doc-popup"
>
{this.props.doc} {this.props.doc}
</div> </div>
</label> </label>

View file

@ -66,7 +66,7 @@ export default class PropertyGroup extends React.Component {
/> />
}) })
return <div> return <div className="maputnik-property-group">
{fields} {fields}
</div> </div>
} }

View file

@ -105,6 +105,7 @@ export default class ZoomSpecField extends React.Component {
if(idx === 1) { if(idx === 1) {
label = <label style={{...input.label, width: '41%'}}> label = <label style={{...input.label, width: '41%'}}>
<Button <Button
className="maputnik-add-stop"
style={{fontSize: fontSizes[5]}} style={{fontSize: fontSizes[5]}}
onClick={this.addStop.bind(this)} onClick={this.addStop.bind(this)}
> >
@ -123,6 +124,7 @@ export default class ZoomSpecField extends React.Component {
}}> }}>
{label} {label}
<Button <Button
className="maputnik-delete-stop"
style={{backgroundColor: null, verticalAlign: 'top'}} style={{backgroundColor: null, verticalAlign: 'top'}}
onClick={this.deleteStop.bind(this, idx)} onClick={this.deleteStop.bind(this, idx)}
> >
@ -160,7 +162,9 @@ export default class ZoomSpecField extends React.Component {
} }
return <div style={input.property}> return <div style={input.property}
className="maputnik-zoom-spec-field"
>
<DocLabel <DocLabel
label={labelFromFieldName(this.props.fieldName)} label={labelFromFieldName(this.props.fieldName)}
doc={this.props.fieldSpec.doc} doc={this.props.fieldSpec.doc}
@ -170,6 +174,7 @@ export default class ZoomSpecField extends React.Component {
/> />
{this.props.fieldSpec['zoom-function'] && {this.props.fieldSpec['zoom-function'] &&
<Button <Button
className="maputnik-make-zoom-function"
style={{ style={{
verticalAlign: 'top', verticalAlign: 'top',
backgroundColor: null, backgroundColor: null,

View file

@ -95,7 +95,7 @@ export default class CombiningFilterEditor extends React.Component {
} }
return <div> return <div>
<div style={{ marginBottom: margins[1] }}> <div className="maputnik-filter-editor-compound-select" style={{ marginBottom: margins[1] }}>
<DocLabel <DocLabel
label={"Compound Filter"} label={"Compound Filter"}
doc={GlSpec.layer.filter.doc + " Combine multiple filters together by using a compound filter."} doc={GlSpec.layer.filter.doc + " Combine multiple filters together by using a compound filter."}
@ -115,7 +115,7 @@ export default class CombiningFilterEditor extends React.Component {
/> />
</div> </div>
{editorBlocks} {editorBlocks}
<div style={{marginTop: margins[1]}}> <div className="maputnik-filter-editor-add-wrapper" style={{marginTop: margins[1]}}>
<Button onClick={this.addFilterItem.bind(this)} style={{ <Button onClick={this.addFilterItem.bind(this)} style={{
display: 'inline-block', display: 'inline-block',
marginLeft: '79%', marginLeft: '79%',

View file

@ -9,8 +9,8 @@ class FilterEditorBlock extends React.Component {
} }
render() { render() {
return <div> return <div className="maputnik-filter-editor-block">
<div style={{display: 'inline-block', width: '8%'}}> <div className="maputnik-filter-editor-block-action" style={{display: 'inline-block', width: '8%'}}>
<Button <Button
style={{backgroundColor: null}} style={{backgroundColor: null}}
onClick={this.props.onDelete} onClick={this.props.onDelete}
@ -18,7 +18,7 @@ class FilterEditorBlock extends React.Component {
<DeleteIcon /> <DeleteIcon />
</Button> </Button>
</div> </div>
<div style={{display: 'inline-block', width: '92%'}}> <div className="maputnik-filter-editor-block-content" style={{display: 'inline-block', width: '92%'}}>
{this.props.children} {this.props.children}
</div> </div>
</div> </div>

View file

@ -29,36 +29,32 @@ class SingleFilterEditor extends React.Component {
const propertyName = f[1] const propertyName = f[1]
const filterArgs = f.slice(2) const filterArgs = f.slice(2)
return <div style={{ return <div className="maputnik-filter-editor-single"
style={{
marginTop: margins[1], marginTop: margins[1],
marginBottom: margins[1], marginBottom: margins[1],
...this.props.style ...this.props.style
}}> }}>
<AutocompleteInput <div className="maputnik-filter-editor-property">
wrapperStyle={{ <AutocompleteInput
width: '22%' value={propertyName}
}} options={Object.keys(this.props.properties).map(propName => [propName, propName])}
value={propertyName} onChange={newPropertyName => this.onFilterPartChanged(filterOp, newPropertyName, filterArgs)}
options={Object.keys(this.props.properties).map(propName => [propName, propName])} />
onChange={newPropertyName => this.onFilterPartChanged(filterOp, newPropertyName, filterArgs)} </div>
/> <div className="maputnik-filter-editor-operator">
<SelectInput <SelectInput
style={{ value={filterOp}
width: '19%', onChange={newFilterOp => this.onFilterPartChanged(newFilterOp, propertyName, filterArgs)}
marginLeft: '2%' options={otherFilterOps}
}} />
value={filterOp} </div>
onChange={newFilterOp => this.onFilterPartChanged(newFilterOp, propertyName, filterArgs)} <div className="maputnik-filter-editor-args">
options={otherFilterOps} <StringInput
/> value={filterArgs.join(',')}
<StringInput onChange={ v=> this.onFilterPartChanged(filterOp, propertyName, v.split(','))}
style={{ />
width: '54%', </div>
marginLeft: '2%'
}}
value={filterArgs.join(',')}
onChange={ v=> this.onFilterPartChanged(filterOp, propertyName, v.split(','))}
/>
</div> </div>
} }

View file

@ -50,7 +50,8 @@ class ArrayInput extends React.Component {
} }
}) })
return <div style={{display: 'inline-block', width: '50%'}}> return <div className="maputnik-array"
style={{display: 'inline-block', width: '50%'}}>
{inputs} {inputs}
</div> </div>
} }

View file

@ -20,6 +20,7 @@ class AutocompleteInput extends React.Component {
render() { render() {
return <Autocomplete return <Autocomplete
className="maputnik-autocomplete"
menuStyle={{ menuStyle={{
border: 'none', border: 'none',
padding: '2px 0', padding: '2px 0',

View file

@ -51,6 +51,7 @@ class CheckboxInput extends React.Component {
return <label style={styles.root}> return <label style={styles.root}>
<input <input
className="maputnik-checkbox"
type="checkbox" type="checkbox"
style={{ style={{
...styles.input, ...styles.input,

View file

@ -32,7 +32,9 @@ class InputBlock extends React.Component {
return <div style={{ return <div style={{
...input.property, ...input.property,
...this.props.style, ...this.props.style,
}}> }}
className="maputnik-input-block"
>
{this.props.doc && {this.props.doc &&
<DocLabel <DocLabel
label={this.props.label} label={this.props.label}

View file

@ -37,7 +37,9 @@ class MultiButtonInput extends React.Component {
return <div style={{ return <div style={{
display: 'inline-block', display: 'inline-block',
...this.props.style, ...this.props.style,
}}> }}
className="maputnik-multibutton"
>
{buttons} {buttons}
</div> </div>
} }

View file

@ -68,8 +68,8 @@ class NumberInput extends React.Component {
render() { render() {
return <input return <input
className="maputnik-number"
style={{ style={{
...input.input,
...this.props.style ...this.props.style
}} }}
placeholder={this.props.default} placeholder={this.props.default}

View file

@ -17,6 +17,7 @@ class SelectInput extends React.Component {
} }
return <select return <select
className="maputnik-select"
style={{ style={{
...input.select, ...input.select,
...this.props.style ...this.props.style

View file

@ -22,6 +22,7 @@ class StringInput extends React.Component {
render() { render() {
return <input return <input
className="maputnik-string"
style={{ style={{
...input.input, ...input.input,
...this.props.style ...this.props.style

View file

@ -172,7 +172,8 @@ export default class LayerEditor extends React.Component {
</LayerEditorGroup> </LayerEditorGroup>
}) })
return <div> return <div className="maputnik-layer-editor"
>
{groups} {groups}
</div> </div>
} }

View file

@ -36,18 +36,7 @@ export default class LayerEditorGroup extends React.Component {
render() { render() {
return <div> return <div>
<div style={{ <div className="maputnik-layer-editor-group"
fontWeight: 'bold',
fontSize: fontSizes[4],
backgroundColor: this.state.hover ? Color(colors.black).lighten(0.30).string() : Color(colors.black).lighten(0.15).string(),
color: colors.lowgray,
cursor: 'pointer',
userSelect: 'none',
padding: margins[1],
display: 'flex',
flexDirection: 'row',
lineHeight: '20px',
}}
onMouseOver={e => this.setState({hover: true})} onMouseOver={e => this.setState({hover: true})}
onMouseOut={e => this.setState({hover: false})} onMouseOut={e => this.setState({hover: false})}
onClick={e => this.props.onActiveToggle(!this.props.isActive)} onClick={e => this.props.onActiveToggle(!this.props.isActive)}

View file

@ -69,11 +69,7 @@ class LayerListContainer extends React.Component {
onLayerVisibilityToggle={this.onLayerVisibilityToggle.bind(this)} onLayerVisibilityToggle={this.onLayerVisibilityToggle.bind(this)}
/> />
}) })
return <ul style={{ return <ul className="maputnik-layer-list-container">
padding: 0,
margin: 0,
paddingBottom: margins[4]
}}>
{layerPanels} {layerPanels}
</ul> </ul>
} }

View file

@ -66,11 +66,8 @@ class IconAction extends React.Component {
render() { render() {
return <a return <a
style={{ className="maputnik-icon-action"
display: "inline", style={this.props.style}
marginLeft: margins[0],
...this.props.style
}}
onClick={this.props.onClick} onClick={this.props.onClick}
onMouseOver={e => this.setState({hover: true})} onMouseOver={e => this.setState({hover: true})}
onMouseOut={e => this.setState({hover: false})} onMouseOut={e => this.setState({hover: false})}
@ -121,25 +118,7 @@ class LayerListItem extends React.Component {
render() { render() {
const itemStyle = { const itemStyle = {
fontWeight: 400,
color: this.props.isSelected ? colors.white : colors.lowgray,
fontSize: fontSizes[5],
borderLeft: 0,
borderTop: 0,
borderBottom: 1,
borderRight: 0,
borderStyle: "solid",
userSelect: 'none',
listStyle: 'none',
zIndex: 2000,
cursor: 'pointer',
position: 'relative',
padding: margins[1],
paddingLeft: margins[2],
paddingRight: margins[2],
borderColor: Color(colors.black).lighten(0.10).string(),
backgroundColor: colors.black, backgroundColor: colors.black,
lineHeight: 1.3,
} }
if(this.state.hover) { if(this.state.hover) {
@ -159,18 +138,10 @@ class LayerListItem extends React.Component {
onClick={e => this.props.onLayerSelect(this.props.layerId)} onClick={e => this.props.onLayerSelect(this.props.layerId)}
onMouseOver={e => this.setState({hover: true})} onMouseOver={e => this.setState({hover: true})}
onMouseOut={e => this.setState({hover: false})} onMouseOut={e => this.setState({hover: false})}
style={itemStyle}> className="maputnik-layer-list-item"
<div style={{ >
display: 'flex',
flexDirection: 'row'
}}>
<LayerTypeDragHandle type={this.props.layerType} /> <LayerTypeDragHandle type={this.props.layerType} />
<span style={{ <span className="maputnik-layer-list-item-id">{this.props.layerId}</span>
width: 115,
whiteSpace: 'nowrap',
overflow: 'hidden',
textOverflow: 'ellipsis'
}}>{this.props.layerId}</span>
<span style={{flexGrow: 1}} /> <span style={{flexGrow: 1}} />
<IconAction {...iconProps} <IconAction {...iconProps}
action={'delete'} action={'delete'}
@ -185,7 +156,6 @@ class LayerListItem extends React.Component {
action={this.props.visibility === 'visible' ? 'hide' : 'show'} action={this.props.visibility === 'visible' ? 'hide' : 'show'}
onClick={e => this.props.onLayerVisibilityToggle(this.props.layerId)} onClick={e => this.props.onLayerVisibilityToggle(this.props.layerId)}
/> />
</div>
</li> </li>
} }
} }

View file

@ -142,16 +142,8 @@ export default class MapboxGlMap extends React.Component {
render() { render() {
return <div return <div
className="maputnik-map"
ref={x => this.container = x} ref={x => this.container = x}
style={{ ></div>
position: "fixed",
top: 0,
right: 0,
bottom: 0,
height: "100%",
width: "75%",
...this.props.style,
}}>
</div>
} }
} }

View file

@ -15,32 +15,17 @@ class Modal extends React.Component {
render() { render() {
return <Overlay isOpen={this.props.isOpen}> return <Overlay isOpen={this.props.isOpen}>
<div style={{ <div className="maputnik-modal">
minWidth: 350, <div className="maputnik-modal-header">
maxWidth: 600, <span className="maputnik-modal-header-title">{this.props.title}</span>
backgroundColor: colors.black,
boxShadow: '0px 0px 5px 0px rgba(0,0,0,0.3)',
}}>
<div style={{
backgroundColor: colors.gray,
display: 'flex',
flexDirection: 'row',
padding: margins[2],
fontSize: fontSizes[4],
}}>
{this.props.title}
<span style={{flexGrow: 1}} /> <span style={{flexGrow: 1}} />
<a <a className="maputnik-modal-header-toggle"
onClick={() => this.props.onOpenToggle(false)} onClick={() => this.props.onOpenToggle(false)}
style={{ cursor: 'pointer' }} > style={{ cursor: 'pointer' }} >
<CloseIcon /> <CloseIcon />
</a> </a>
</div> </div>
<div style={{ <div className="maputnik-modal-content">{this.props.children}</div>
padding: margins[2],
}}>
{this.props.children}
</div>
</div> </div>
</Overlay> </Overlay>
} }

View file

@ -27,7 +27,7 @@ class PublicSource extends React.Component {
} }
render() { render() {
return <div style={{ return <div className="maputnik-public-source" style={{
verticalAlign: 'top', verticalAlign: 'top',
marginTop: margins[2], marginTop: margins[2],
marginRight: margins[2], marginRight: margins[2],
@ -83,7 +83,8 @@ class ActiveSourceTypeEditor extends React.Component {
const inputProps = { } const inputProps = { }
return <div style={{ return <div style={{
}}> }}>
<div style={{ <div className="maputnik-active-source-type-editor"
style={{
backgroundColor: colors.gray, backgroundColor: colors.gray,
color: colors.lowgray, color: colors.lowgray,
padding: margins[1], padding: margins[1],

View file

@ -2,6 +2,7 @@ import React from 'react';
import ReactDOM from 'react-dom'; import ReactDOM from 'react-dom';
import './favicon.ico' import './favicon.ico'
import './style.scss'
import './index.css' import './index.css'
import App from './components/App'; import App from './components/App';

222
src/style.scss Normal file
View file

@ -0,0 +1,222 @@
$color-black: #1c1f24;
$color-gray: #26282e;
$color-midgray: #36383e;
$color-lowgray: #8e8e8e;
$color-white: #f0f0f0;
$margin-1: 3px;
$margin-2: 5px;
$margin-3: 10px;
$margin-4: 30px;
$margin-5: 40px;
$font-size-1: 24px;
$font-size-2: 20px;
$font-size-3: 18px;
$font-size-4: 16px;
$font-size-5: 14px;
$font-size-6: 12px;
$font-family: Roboto, sans-serif;
.maputnik-toolbar {
position: fixed;
height: 40px;
width: 100%;
z-index: 100;
left: 0;
top: 0;
background-color: $color-black;
}
.maputnik-layer-list-container {
padding: 0;
margin: 0;
padding-bottom: $margin-5;
}
.maputnik-layer-list-item {
font-weight: 400;
color: $color-lowgray;
font-size: $font-size-6;
border-width: 0px 0px 1px;
border-style: solid;
border-color: lighten($color-black, 0.1);
user-select: none;
list-style: none;
z-index: 2000;
cursor: pointer;
position: relative;
padding: 5px 10px;
background-color: $color-black;
line-height: 1.3;
display: flex;
flex-direction: row;
}
.maputnik-icon-action {
display: inline;
margin-left: $margin-1;
}
.maputnik-scroll-container {
overflow-x: visible;
overflow-y: scroll;
bottom: 0px;
left: 0px;
right: 0px;
top: 1px;
position: absolute;
}
.maputnik-layout {
font-family: $font-family;
color: $color-white;
}
.maputnik-layout-list {
position: fixed;
bottom: 0px;
height: 100%;
top: 40px;
left: 0px;
z-index: 1;
width: 200px;
overflow: hidden;
background-color: $color-black;
}
.maputnik-layout-drawer {
position: fixed;
bottom: 0px;
height: 100%;
top: 40px;
left: 200px;
z-index: 1;
width: 350px;
background-color: $color-black;
}
.maputnik-layout-bottom {
position: fixed;
height: 50px;
bottom: 0px;
left: 550px;
z-index: 1;
width: 100%;
background-color: $color-black;
}
.maputnik-layer-editor-group {
font-weight: bold;
font-size: $font-size-5;
background-color: darken($color-gray, 1.5);
color: $color-lowgray;
cursor: pointer;
user-select: none;
padding: $margin-2;
display: flex;
flex-direction: row;
line-height: 20px;
}
.maputnik-map {
position: fixed !important;
top: 40px;
right: 0px;
bottom: 0px;
height: 100%;
width: 75%;
}
.maputnik-toolbar-link {
display: inline-block;
padding: $margin-3;
font-size: $font-size-5;
cursor: pointer;
color: $color-white;
text-decoration: none;
}
.maputnik-toolbar-action {
@extend .maputnik-toolbar-link;
&:hover {
background-color: $color-gray;
}
}
.maputnik-doc-wrapper {
display: inline-block;
box-sizing: border-box;
font-size: $font-size-6;
line-height: 2;
color: $color-lowgray;
user-select: none;
position: relative;
vertical-align: top;
width: 50%;
}
.maputnik-base {
display: inline-block;
box-sizing: border-box;
font-size: $font-size-6;
line-height: 2;
padding-left: $margin-2;
padding-right: $margin-2;
}
.maputnik-input {
@extend .maputnik-base;
border: none;
background-color: $color-gray;
color: $color-lowgray;
}
.maputnik-string {
@extend .maputnik-input;
width: 50%;
}
.maputnik-number {
@extend .maputnik-input;
}
.maputnik-color {
@extend .maputnik-input;
}
.maputnik-color-wrapper {
position: relative;
display: inline;
}
.maputnik-color-picker-offset {
}
.maputnik-color-picker-overlay {
}
.maputnik-button {
cursor: pointer;
background-color: $color-midgray;
color: $color-lowgray;
font-size: $font-size-6;
padding: $margin-2;
user-select: none;
border-radius: 2px;
box-sizing: border-box;
}
.maputnik-layer-list-item-id {
width: 115px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.maputnik-filter-editor-property {
display: inline-block;
width: '22%';
}
.maputnik-filter-editor-operator {
display: inline-block;
width: 19%;
margin-left: 2%;
}
.maputnik-filter-editor-args {
display: inline-block;
width: 54%;
margin-left: 2%;
}
.maputnik-modal {
min-width: 350px;
max-width: 600px;
background-color: $color-black;
box-shadow: 0px 0px 5px 0px rgba(0,0,0,0.3);
}
.maputnik-modal-header {
background-color: $color-gray;
display: flex;
flex-direction: row;
padding: $margin-3;
font-size: $font-size-5;
}
.maputnik-modal-header-toggle {
cursor: pointer;
}
.maputnik-modal-content {
padding: $margin-3;
}

View file

@ -29,6 +29,10 @@ module.exports = [
test: /\.json$/, test: /\.json$/,
loader: 'json-loader' loader: 'json-loader'
}, },
{
test: /[\/\\](node_modules|global|src)[\/\\].*\.scss$/,
loaders: ["style-loader", "css-loader", "sass-loader"]
},
{ {
test: /[\/\\](node_modules|global|src)[\/\\].*\.css$/, test: /[\/\\](node_modules|global|src)[\/\\].*\.css$/,
loaders: [ loaders: [