Commit 6c776a54 authored by Yannis Barlas's avatar Yannis Barlas

fix: correct order of css properties according to stylelint

parent a5064e89
{
"processors": ["stylelint-processor-styled-components"],
"extends": [
"stylelint-config-recommended",
"stylelint-config-styled-components"
]
],
"plugins": ["stylelint-order"],
"processors": ["stylelint-processor-styled-components"],
"rules": {
"order/order": ["declarations", "rules", "at-rules"],
"order/properties-alphabetical-order": true
}
}
......@@ -76,8 +76,8 @@ const Tag = styled.span`
background-color: ${th('colorBackgroundHue')};
font-size: ${th('fontSizeBase')};
line-height: ${th('lineHeightBase')};
padding: calc(${th('gridUnit')} / 2);
margin: ${th('gridUnit')} 0;
padding: calc(${th('gridUnit')} / 2);
`
const SuggestedReviewer = props => {
......
......@@ -13,10 +13,10 @@ const StyledBar = styled(AppBar)`
flex: initial;
> div:first-child > span:first-child {
padding: calc(${th('gridUnit')} * 3) 1rem;
margin: 0 calc(${th('gridUnit')} * 3) 0 0;
height: calc(${th('gridUnit')} * 9);
background: ${th('colorPrimary')};
height: calc(${th('gridUnit')} * 9);
margin: 0 calc(${th('gridUnit')} * 3) 0 0;
padding: calc(${th('gridUnit')} * 3) 1rem;
a {
color: ${th('colorTextReverse')};
......
......@@ -32,8 +32,8 @@ const Ribbon = styled.div`
color: ${th('colorTextReverse')};
font-size: ${th('fontSizeBaseSmall')};
line-height: ${th('lineHeightBaseSmall')};
padding: calc(${th('gridUnit')} / 2) 0;
margin-top: ${th('gridUnit')};
padding: calc(${th('gridUnit')} / 2) 0;
text-align: center;
visibility: ${props => (props.hide ? 'hidden' : 'visible')};
width: 60%;
......
......@@ -29,8 +29,8 @@ const Wrapper = styled.div`
&.react-autosuggest__suggestions-container--open {
border: 1px dashed ${th('colorBorder')};
border-top: 0;
border-radius: 0 5px 0 5px;
border-top: 0;
}
ul {
......
......@@ -39,11 +39,10 @@ const rows = [
const Field = styled(AutoComplete)`
/* background: pink; */
/* flex-basis: 450px; */
justify-content: flex-start;
display: flex;
/* flex-basis: 450px; */
height: calc(${th('gridUnit')} * 4);
justify-content: flex-start;
padding: 0 ${th('gridUnit')};
width: unset;
......@@ -68,10 +67,10 @@ const Row = styled.div`
/* background: orange; */
/* border: 1px dashed yellow; */
display: flex;
justify-content: flex-start;
flex-direction: row;
flex-wrap: nowrap;
/* height: 50px; */
justify-content: flex-start;
padding: ${th('gridUnit')};
div > div[role='combobox'] > div[role='listbox'] {
......@@ -127,6 +126,7 @@ const IconButton = styled(Button)`
padding: 0;
}
/* stylelint-disable-next-line order/order, order/properties-alphabetical-order */
${props =>
props.primary &&
css`
......
......@@ -13,13 +13,14 @@ const readOnly = css`
`
const StyledTextField = styled(UiTextField)`
line-height: ${th('lineHeightBase')};
margin-bottom: calc(${th('gridUnit')} * 2);
width: calc(${th('gridUnit')} * 50);
input {
height: calc(${th('gridUnit')} * 4);
${props => props.readOnly && readOnly};
}
line-height: ${th('lineHeightBase')};
margin-bottom: calc(${th('gridUnit')} * 2);
width: calc(${th('gridUnit')} * 50);
`
const Error = styled.div.attrs({
......
......@@ -50,9 +50,9 @@ const Field = props => {
// TO DO -- extract Labels from TextField
const Label = styled.label`
display: block;
font-size: ${th('fontSizeBaseSmall')};
line-height: ${th('lineHeightBaseSmall')};
display: block;
`
const LineWrapper = styled.div`
......
......@@ -22,25 +22,25 @@ const SectionItemTitleWrapper = styled.div`
flex: 1;
`
const GenericRow = styled.div`
align-items: center;
display: flex;
flex: 0 1 100%;
align-items: center;
justify-content: flex-start;
margin-bottom: calc(${th('gridUnit')});
`
const SecondRow = styled.div`
align-items: center;
border-left: ${th('borderWidth')} ${th('borderStyle')} ${th('colorBorder')};
display: flex;
flex: 0 1 100%;
flex-flow: row nowrap;
justify-content: space-between;
margin-bottom: calc(${th('gridUnit')});
flex: 0 1 100%;
border-left: ${th('borderWidth')} ${th('borderStyle')} ${th('colorBorder')};
`
const SectionItemTitle = styled.div`
font-size: ${th('fontSizeHeading4')};
font-family: ${th('fontReading')};
font-size: ${th('fontSizeHeading4')};
line-height: ${th('lineHeightHeading4')};
margin-left: ${th('gridUnit')};
word-wrap: break-word;
......
......@@ -7,8 +7,6 @@ import { th } from '@pubsweet/ui-toolkit'
import { getCurrentStatus } from '../../helpers/status'
const StatusLabel = styled.span`
font-size: ${th('fontSizeBaseSmall')};
line-height: ${th('lineHeightBaseSmall')};
color: ${props => {
if (props.decision && props.decision.accepted) {
return th('colorSuccess')
......@@ -17,8 +15,11 @@ const StatusLabel = styled.span`
}
return th('colorFurniture')
}};
text-transform: uppercase;
font-size: ${th('fontSizeBaseSmall')};
line-height: ${th('lineHeightBaseSmall')};
margin: 0 calc(${th('gridUnit')}) 0 0;
text-transform: uppercase;
`
const StatusItem = props => {
......
......@@ -8683,6 +8683,13 @@ postcss-selector-parser@^3.1.0:
indexes-of "^1.0.1"
uniq "^1.0.1"
postcss-sorting@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/postcss-sorting/-/postcss-sorting-4.0.0.tgz#abfdf41ff8f7710f66f5dc7e78a3a3cce3983c21"
dependencies:
lodash "^4.17.4"
postcss "^7.0.0"
postcss-styled@>=0.33.0, postcss-styled@^0.33.0:
version "0.33.0"
resolved "https://registry.yarnpkg.com/postcss-styled/-/postcss-styled-0.33.0.tgz#69be377584105a582fda7e4f76888e5b97eed737"
......@@ -10721,6 +10728,14 @@ stylelint-config-styled-components@^0.1.1:
version "0.1.1"
resolved "https://registry.yarnpkg.com/stylelint-config-styled-components/-/stylelint-config-styled-components-0.1.1.tgz#b408388d7c687833ab4be4c4e6522d97d2827ede"
stylelint-order@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/stylelint-order/-/stylelint-order-1.0.0.tgz#089fc3d5cdf7e7d4ac1882f65b60b25db750413c"
dependencies:
lodash "^4.17.10"
postcss "^7.0.2"
postcss-sorting "^4.0.0"
stylelint-processor-styled-components@^1.3.1:
version "1.3.2"
resolved "https://registry.yarnpkg.com/stylelint-processor-styled-components/-/stylelint-processor-styled-components-1.3.2.tgz#092cf8fb064b31c6d0d3bedf0c4844349e1e8f0f"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment