Skip to content

Commit

Permalink
fixed style errors and omitted default style rules when needed #556
Browse files Browse the repository at this point in the history
  • Loading branch information
vbojilova committed Jul 2, 2024
1 parent f97dae2 commit e0a1313
Show file tree
Hide file tree
Showing 19 changed files with 49 additions and 36 deletions.
22 changes: 21 additions & 1 deletion .stylelintrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,25 @@
"extends": [
"stylelint-config-standard"
],
"customSyntax": "postcss-styled-syntax"
"customSyntax": "postcss-styled-syntax",
"rules":{
"at-rule-empty-line-before": null,
"media-query-no-invalid": null,
"alpha-value-notation": null,
"rule-empty-line-before": null,
"length-zero-no-unit": null,
"declaration-empty-line-before": "never",
"selector-class-pattern": null,
"no-empty-source": null,
"declaration-block-no-redundant-longhand-properties": null,
"color-function-notation": null,
"media-feature-range-notation": null,
"comment-empty-line-before": null,
"color-hex-length": null,
"number-max-precision": null,
"no-descending-specificity": null,
"custom-property-empty-line-before": null,
"shorthand-property-no-redundant-values": null,
"property-no-vendor-prefix": null
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ const TriangleBottom = styled.div`
}}%;
margin-left: -10px;
&:after {
&::after {
content: "";
position: absolute;
width: 20px;
Expand Down
1 change: 1 addition & 0 deletions app/components/EntityListItem/EntityListItemMain/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ const EntityListItemMainTopWrap = styled.div`
? 0
: props.theme.sizes.mainListItem.paddingHorizontal
}px;
}
`;

const EntityListItemMainSubtitle = styled.div`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,13 @@ const EntityListItemMainTopWrap = styled.div`
right: 0;
padding-top: 4px;
padding-right: 6px;
@media (min-width: ${(props) => props.theme && props.theme.breakpoints ? props.theme.breakpoints.small : '769px'}) {
@media (min-width: ${(props) => props.theme && props.theme.breakpoints ? props.theme.breakpoints.small : '769px'}){
padding-top: ${(props) => props.theme.sizes && props.theme.sizes.mainListItem.paddingTop}px;
padding-right: ${(props) => (!props.theme.sizes)
? 0
: props.theme.sizes.mainListItem.paddingHorizontal
}px;
}
`;

const Reference = styled(Label)`
Expand Down
11 changes: 4 additions & 7 deletions app/components/Header/Brand.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,14 @@ export default styled.a`
left: 0;
text-decoration: none;
color: ${palette('headerBrand', 0)};
&:hover {
color: ${palette('headerBrandHover', 0)};
opacity: 0.75;
}
z-index: 110;
overflow: hidden;
padding-right: 46px;
height: ${(props) => props.theme.sizes.header.banner.heightMobile}px;
&:hover {
color: ${palette('headerBrandHover', 0)};
opacity: 0.75;
}
@media (min-width: ${(props) => props.theme.breakpoints.small}) {
padding-right: 46px;
height: ${(props) => props.theme.sizes.header.banner.height}px;
Expand Down
1 change: 0 additions & 1 deletion app/components/Header/LinkAccount.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,4 @@ export default styled(LinkSecondary)`
color: ${(props) => props.active ? palette('headerNavAccountItemHover', 1) : palette('headerNavAccountItemHover', 0)};
text-decoration: ${(props) => props.active ? 'none' : 'underline'};
}
}
`;
1 change: 0 additions & 1 deletion app/components/SelectReset/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ const Select = styled.select`
}
@media print {
appearance: none;
text-overflow: '';
text-indent: 0.01px; /* Removes default arrow from firefox */
text-overflow: ""; /* Removes default arrow from firefox */
font-size: ${(props) => props.theme.sizes.print.small};
Expand Down
2 changes: 1 addition & 1 deletion app/components/buttons/ButtonCancel.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import ButtonForm from './ButtonForm';

const ButtonCancel = styled(ButtonForm)`
color: ${palette('buttonCancel', 0)};
&:hover, &:hover {
&:hover {
color: ${palette('buttonCancelHover', 0)};
}
`;
Expand Down
5 changes: 1 addition & 4 deletions app/components/buttons/ButtonDefaultWithIcon/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,7 @@ const Word = styled.span`
return 'inline';
}};
}
${(props) => props.iconRight
? '&:after { content: " "; }'
: '&:before { content: " "; }'
}
${(props) => props.iconRight ? '&::after { content: " "; }' : '&::before { content: " "; }'}
`;

class ButtonDefaultWithIcon extends React.PureComponent { // eslint-disable-line react/prefer-stateless-function
Expand Down
2 changes: 1 addition & 1 deletion app/components/buttons/ButtonTagCategory/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const getColor = (props, isHover = false) => {

// eslint-disable no-nested-ternary
const ButtonTagCategory = styled(Button)`
color: ${(props) => getFontColor(props)}};
color: ${(props) => getFontColor(props)};
background-color: ${(props) => getColor(props)};
margin-right: 2px;
border-radius: ${(props) => props.isSmartTag ? 9999 : 3}px;
Expand Down
1 change: 1 addition & 0 deletions app/components/buttons/ButtonTagCategoryInverse/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ const ButtonTagCategoryInverse = styled(Button)`
: palette('taxonomiesHover', props.taxId || 0)
};
}
}
`;

export default ButtonTagCategoryInverse;
2 changes: 1 addition & 1 deletion app/components/categoryList/CategoryListItem/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ const Bar = styled.div`
}
@media print {
z-index: 0;
&:before {
&::before {
content: '';
display: block;
position: absolute;
Expand Down
2 changes: 1 addition & 1 deletion app/components/categoryList/CategoryListKey/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ const Square = styled.div`
position: relative;
overflow: hidden;
z-index: 0;
&:before {
&::before {
content: '';
display: block;
position: absolute;
Expand Down
2 changes: 1 addition & 1 deletion app/components/fields/ShortTitleTag.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const getFontColor = ({ pIndex }) => {

const ShortTitleTag = styled.span`
display: inline-block;
color: ${(props) => getFontColor(props)}};
color: ${(props) => getFontColor(props)};
background-color: ${({ pIndex }) => palette('taxonomies', pIndex || 0)};
padding: 1px 6px;
margin-right: 2px;
Expand Down
1 change: 0 additions & 1 deletion app/components/forms/DateControl/styles.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ const DatePickerStyle = createGlobalStyle`
}
.rdp-cell {
//border: 1px solid #eaecec;
text-align: center;
cursor: pointer;
vertical-align: middle;
Expand Down
4 changes: 2 additions & 2 deletions app/components/styled/ColumnHeader/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const ColumnHeader = styled.div`
padding-left: ${(props) => (props.isSelect)
? 0
: 4
}px
}px;
word-break: break-word;
width: ${(props) => props.colWidth}%;
position: relative;
Expand Down Expand Up @@ -38,7 +38,7 @@ const ColumnHeader = styled.div`
line-height: 30px;
padding-top: 0;
padding-bottom: 0;
&:before {
&::before {
content: '';
display: block;
position: absolute;
Expand Down
2 changes: 1 addition & 1 deletion app/components/styled/SkipContent/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@ const SkipContent = styled.a`
outline: 1px solid ${palette('primary', 0)};
outline-offset: 0px;
}
}`;
`;

export default SkipContent;
2 changes: 1 addition & 1 deletion app/containers/Overview/HorizontalDiagram.js
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ const DiagramButtonMain = styled(DiagramButton)`
}
@media (min-width: ${(props) => props.theme.breakpoints.small}) {
padding: 0.4em 0.75em 1em;
&:before {
&::before {
content: '';
display: inline-block;
vertical-align: middle;
Expand Down
19 changes: 9 additions & 10 deletions app/global-styles.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,47 +12,47 @@ const GlobalStyle = createGlobalStyle`
/* roboto - 400 - latin */
@font-face {
font-display: swap;
font-family: 'Roboto';
font-family: Roboto;
font-style: normal;
font-weight: 400;
src: url(${Roboto400TTF}) format('truetype');
}
/* roboto - 400 - italic - latin */
@font-face {
font-display: swap;
font-family: 'Roboto';
font-family: Roboto;
font-style: italic;
font-weight: 400;
src: url(${Roboto400iTTF}) format('truetype');
}
/* roboto - 500 - latin */
@font-face {
font-display: swap;
font-family: 'Roboto';
font-family: Roboto;
font-style: normal;
font-weight: 500;
src: url(${Roboto500TTF}) format('truetype');
}
/* roboto - 500 - italic - latin */
@font-face {
font-display: swap;
font-family: 'Roboto';
font-family: Roboto;
font-style: italic;
font-weight: 500;
src: url(${Roboto500iTTF}) format('truetype');
}
/* roboto - 700 - latin */
@font-face {
font-display: swap;
font-family: 'Roboto';
font-family: Roboto;
font-style: normal;
font-weight: 700;
src: url(${Roboto700TTF}) format('truetype');
}
/* roboto - 700 - italic - latin */
@font-face {
font-display: swap;
font-family: 'Roboto';
font-family: Roboto;
font-style: italic;
font-weight: 700;
src: url(${Roboto700iTTF}) format('truetype');
Expand All @@ -64,13 +64,13 @@ const GlobalStyle = createGlobalStyle`
width: 100%;
}
body {
font-family: 'Roboto', 'Helvetica Neue', Helvetica, Arial, sans-serif;
font-family: Roboto, 'Helvetica Neue', Helvetica, Arial, sans-serif;
font-size: 16px;
line-height: 1.428571429;
color: #1c2121;;
}
button, input, select, textarea {
font-family: 'Roboto', 'Helvetica Neue', Helvetica, Arial, sans-serif;
font-family: Roboto, 'Helvetica Neue', Helvetica, Arial, sans-serif;
background-color: transparent;
border-style: none;
color: inherit;
Expand Down Expand Up @@ -100,7 +100,6 @@ const GlobalStyle = createGlobalStyle`
text-align: left;
color: #0077d8;
text-decoration: none;
&:hover {
color: #d66149;
}
Expand Down Expand Up @@ -278,7 +277,7 @@ const GlobalStyle = createGlobalStyle`
}
@media print {
@page {
margin: 1.5cm 1.2cm 1.5cm;
margin: 1.5cm 1.2cm;
}
body {
font-size: 10pt;
Expand Down

0 comments on commit e0a1313

Please sign in to comment.