diff --git a/website/.stylelintrc.json b/website/.stylelintrc.json index 462ad980b2b..c68ef76bfe2 100644 --- a/website/.stylelintrc.json +++ b/website/.stylelintrc.json @@ -1,32 +1,3 @@ { - "extends": ["stylelint-config-standard", "stylelint-config-prettier"], - "plugins": ["stylelint-scss"], - "rules": { - "at-rule-no-unknown": null, - "scss/at-rule-no-unknown": [true], - "color-named": "always-where-possible", - "declaration-block-no-duplicate-properties": [ - true, - { - "ignore": ["consecutive-duplicates-with-different-values"] - } - ], - "declaration-empty-line-before": null, - "indentation": 4, - "max-empty-lines": 1, - "no-duplicate-selectors": true, - "scss/dollar-variable-pattern": "^[a-z\\d](?:[a-z\\d]|-(?=[a-z\\d]))*$", - "scss/selector-no-redundant-nesting-selector": true, - "selector-class-pattern": [ - "^[a-z0-9-]+(__[a-z0-9-]+)?(--[a-z0-9-]+)?$", - { - "message": "Please follow BEM naming conventions", - "resolveNestedSelectors": true - } - ], - "string-quotes": "single", - "value-no-vendor-prefix": true, - "font-family-no-missing-generic-family-keyword": null, - "no-descending-specificity": null - } + "extends": ["@sourcegraph/stylelint-config"] } diff --git a/website/package.json b/website/package.json index 5034c7e45b8..1e821b113bb 100644 --- a/website/package.json +++ b/website/package.json @@ -55,6 +55,7 @@ }, "devDependencies": { "@sourcegraph/prettierrc": "^2.1.1", + "@sourcegraph/stylelint-config": "^1.1.2", "@sourcegraph/tslint-config": "^13.0.0", "@types/bootstrap": "^4.1.0", "@types/lodash": "^4.14.109", @@ -67,8 +68,6 @@ "prettier": "^1.14.2", "sharp": "^0.22.0", "stylelint": "^9.2.1", - "stylelint-config-prettier": "^5.0.0", - "stylelint-config-standard": "^18.2.0", "stylelint-scss": "^3.1.0", "tslint": "^5.10.0", "typescript": "^3.1.2" diff --git a/website/src/css/_colors.scss b/website/src/css/_colors.scss index 3eef5afebae..3314164c427 100644 --- a/website/src/css/_colors.scss +++ b/website/src/css/_colors.scss @@ -24,7 +24,7 @@ $light-8: #cad2e2; $light-9: #d7ddea; $light-10: #e4e9f1; $light-11: #f2f4f8; -$light-12: white; +$light-12: #ffffff; $red-0: #fff5f5; $red-1: #ffe3e3; diff --git a/website/src/css/_prism.scss b/website/src/css/_prism.scss index cd430c41540..3a6f815426f 100644 --- a/website/src/css/_prism.scss +++ b/website/src/css/_prism.scss @@ -1,3 +1,4 @@ +// stylelint-disable declaration-property-unit-whitelist code[class*='language-'], pre[class*='language-'] { color: #657b83; diff --git a/website/src/css/components/_Footer.scss b/website/src/css/components/_Footer.scss index a38e3cff8ef..95f908fbbbd 100644 --- a/website/src/css/components/_Footer.scss +++ b/website/src/css/components/_Footer.scss @@ -1,3 +1,4 @@ +// stylelint-disable declaration-property-unit-whitelist .footer__block { background: $dark-10; color: $light-2; @@ -19,7 +20,7 @@ margin: 0 0 0 -8px; } @media screen and (max-width: $media-md) { - padding-bottom: .2rem; + padding-bottom: 0.2rem; margin-top: -2.5rem; .footer__contact { @@ -29,9 +30,9 @@ } .footer__extend { - transition: all .3s ease-in-out; + transition: all 0.3s ease-in-out; * { - transition: all .3s ease-in-out; + transition: all 0.3s ease-in-out; } h3 { cursor: pointer; @@ -41,16 +42,16 @@ padding-left: 0; li { @media screen and (max-width: $media-md) { - transition: all .3s ease-in-out; + transition: all 0.3s ease-in-out; position: relative; top: -60px; overflow: hidden; } } - } @media screen and (min-width: $media-md) { - input, .close--icon { + input, + .close--icon { display: none; } } @@ -60,14 +61,17 @@ } padding-top: 6px; border-top: solid 1px $light-2; - &.community, &.company, &.features, &.resources { + &.community, + &.company, + &.features, + &.resources { .close--icon { height: 18px; width: 18px; position: absolute; top: calc(1rem - 8px); right: 1rem; - transition: all .3s ease-in-out; + transition: all 0.3s ease-in-out; transform: rotate(-45deg); svg { height: 18px; @@ -78,19 +82,19 @@ } } li:last-child { - padding-bottom: .5rem; + padding-bottom: 0.5rem; } input { width: 100%; height: 2rem; position: absolute; - top: 0px; + top: 0; opacity: 0; cursor: pointer; z-index: 9999; - & + ul { + + ul { display: hidden; - height: 0px; + height: 0; padding: 0; } &:checked + ul { @@ -98,16 +102,16 @@ height: 100%; } &:checked + ul li { - transition: all .3s ease-in-out; + transition: all 0.3s ease-in-out; display: block; - top: 0px; + top: 0; } &:checked ~ .close--icon { transform: rotate(0deg); } } } - } + } } .social__column { @@ -134,7 +138,7 @@ text-transform: uppercase; font-weight: 400; font-size: 1rem; - letter-spacing: .1rem; + letter-spacing: 0.1rem; } ul { color: $light-6; @@ -171,7 +175,7 @@ @media screen and (max-width: $media-md) { float: none; a:first-of-type { - margin-left: 0rem; + margin-left: 0; } } } diff --git a/website/src/css/components/_Header.scss b/website/src/css/components/_Header.scss index 516f7a82a28..7503e9a203f 100644 --- a/website/src/css/components/_Header.scss +++ b/website/src/css/components/_Header.scss @@ -1,5 +1,4 @@ -// head - +// stylelint-disable declaration-property-unit-whitelist .header { background-color: #f2f4f8; padding: 1rem; diff --git a/website/src/css/components/_NavigationTabs.scss b/website/src/css/components/_NavigationTabs.scss deleted file mode 100644 index 9a79bcbc1dc..00000000000 --- a/website/src/css/components/_NavigationTabs.scss +++ /dev/null @@ -1,64 +0,0 @@ -.nav-tabs { - .nav-item { - position: relative; - border-top-left-radius: 4px; - border-top-right-radius: 4px; - overflow: hidden; - @media screen and (max-width: $media-md) { - font-size: 0px; - } - a { - color: $dark-1; - &:hover { - color: $dark-11; - } - } - } - - .nav-link { - display: flex; - padding: 7px 15px; - &:hover { - border-color: transparent; - fill: $dark-11; - } - } - - .nav-item.show .nav-link, - .nav-link.active { - border-color: $light-10 $light-10 $light-12; - color: $dark-11; - &:hover { - border-color: $light-10 $light-10 $light-12; - } - @media screen and (max-width: $media-md) { - font-size: 1rem; - } - } - - .nav-item.show .nav-link, - .nav-link.active span { - position: absolute; - height: 2px; - top: 0; - right: 0; - left: 0; - background-color: $blue-7; - } -} -.nav-item.buttons { - .docs-nav-button { - margin-top: 8px; - padding: 0px 12px 0 20px; - display: inline-block !important; - } - @media screen and (max-width: $media-md) { - display: flex; - flex: 0 1 100%; - width: 100%; - - .docs-nav-button { - padding: 12px 12px 0 20px; - } - } -} diff --git a/website/src/css/components/_Testimonials.scss b/website/src/css/components/_Testimonials.scss index 70bc829bad2..4fa8ff533d3 100644 --- a/website/src/css/components/_Testimonials.scss +++ b/website/src/css/components/_Testimonials.scss @@ -1,4 +1,4 @@ -// testimonials +// stylelint-disable declaration-property-unit-whitelist .carousel { padding: 2rem 0; .twitter-tweet { @@ -43,4 +43,4 @@ min-height: 660px; margin: auto; } -} \ No newline at end of file +} diff --git a/website/src/css/pages/_404.scss b/website/src/css/pages/_404.scss index 02c16e9c12f..01c8943b261 100644 --- a/website/src/css/pages/_404.scss +++ b/website/src/css/pages/_404.scss @@ -1,4 +1,4 @@ -// 404 +// stylelint-disable declaration-property-unit-whitelist .error-page { display: flex; @@ -10,7 +10,7 @@ background: url('/c-sprinkles-blank.svg'); background-size: cover; @media screen and (max-width: $media-md) { - background: #fff; + background: #ffffff; background-size: 220%; } diff --git a/website/src/css/pages/_about.scss b/website/src/css/pages/_about.scss index dd1ef1cdef7..9cfbea6bb6f 100644 --- a/website/src/css/pages/_about.scss +++ b/website/src/css/pages/_about.scss @@ -7,7 +7,7 @@ padding: 3rem 0 0 0; background-color: $light-10; &-container { - background-color: white; + background-color: #ffffff; padding: 2rem 2rem; border-top-left-radius: 0.5rem; border-top-right-radius: 0.5rem; diff --git a/website/src/css/pages/_blog-post.scss b/website/src/css/pages/_blog-post.scss index 1bc4cf2eaa7..183f4d4af8f 100644 --- a/website/src/css/pages/_blog-post.scss +++ b/website/src/css/pages/_blog-post.scss @@ -1,3 +1,4 @@ +// stylelint-disable declaration-property-unit-whitelist .blog-post { margin: auto; width: 980px; @@ -19,7 +20,8 @@ p { margin: 1rem 0; } - li > p:first-child, li > p:last-child { + li > p:first-child, + li > p:last-child { margin: 0; } diff --git a/website/src/css/pages/_browser.scss b/website/src/css/pages/_browser.scss index 91014d6b450..924eea8bf1e 100644 --- a/website/src/css/pages/_browser.scss +++ b/website/src/css/pages/_browser.scss @@ -1,3 +1,4 @@ +// stylelint-disable declaration-property-unit-whitelist .browser { padding: 3rem 0; &__card { diff --git a/website/src/css/pages/_content.scss b/website/src/css/pages/_content.scss index 1c6a904e149..8943766e91b 100644 --- a/website/src/css/pages/_content.scss +++ b/website/src/css/pages/_content.scss @@ -1,5 +1,3 @@ -// Content pages - .content-page { &__title { text-align: center; diff --git a/website/src/css/pages/_index.scss b/website/src/css/pages/_index.scss index 9a8a879849b..fa49f7e891e 100644 --- a/website/src/css/pages/_index.scss +++ b/website/src/css/pages/_index.scss @@ -1,3 +1,6 @@ +// stylelint-disable declaration-property-unit-whitelist +// stylelint-disable selector-class-pattern +// stylelint-disable selector-max-id .home { &__jumbotron { background-color: $dark-9; @@ -36,7 +39,7 @@ text-align: left; border-radius: 0.5rem; box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); - background-color: white; + background-color: #ffffff; &-instructions { padding: 2rem; @@ -233,11 +236,9 @@ text-align: left; padding: 2rem; border-radius: 8px; - background-color: white; + background-color: #ffffff; margin: 1rem 0; height: 100%; - &:last-of-type { - } &-hover { box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); } @@ -356,7 +357,6 @@ } } - .product__server { &__jumbotron { background-color: $dark-9; @@ -395,10 +395,10 @@ text-align: left; border-radius: 0.5rem; box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); - background-color: black; + background-color: #000000; &-text { h3 { - margin: 1rem 0 .5rem 0; + margin: 1rem 0 0.5rem 0; } text-align: left; } @@ -467,7 +467,6 @@ } &__feature-block { - #integrations { @media (max-width: $media-md) { display: none; @@ -601,7 +600,7 @@ } &__deploy-text { text-align: left; - padding: 2.6rem 5rem 0rem 0rem ; + padding: 2.6rem 5rem 0 0; margin: 1rem 0; height: 100%; @media (max-width: $media-sm) { @@ -612,14 +611,12 @@ text-align: left; padding: 2rem; border-radius: 8px; - background-color: white; + background-color: #ffffff; margin: 1rem 0; height: 100%; @media (max-width: $media-sm) { margin: 1.5rem; } - &:last-of-type { - } &-hover { box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); } diff --git a/website/src/css/pages/_jobs.scss b/website/src/css/pages/_jobs.scss index db47d7e6c56..745d3eb5ca1 100644 --- a/website/src/css/pages/_jobs.scss +++ b/website/src/css/pages/_jobs.scss @@ -1,5 +1,4 @@ -// jobs page - +// stylelint-disable declaration-property-unit-whitelist .jobs { -webkit-font-smoothing: antialiased; width: 100%; @@ -28,7 +27,7 @@ &__benefits { background: $dark-8; - color: white; + color: #ffffff; &-list { display: flex; @@ -75,7 +74,7 @@ &__work { background: $light-10; - color: black; + color: #000000; &--buttons { display: flex; @@ -124,7 +123,7 @@ &__positions { background: $light-11; - color: black; + color: #000000; &--title { margin: auto auto; diff --git a/website/src/css/pages/_plan.scss b/website/src/css/pages/_plan.scss index f76a11f5a1b..0cf1c7fbc41 100644 --- a/website/src/css/pages/_plan.scss +++ b/website/src/css/pages/_plan.scss @@ -1,3 +1,4 @@ +// stylelint-disable declaration-property-unit-whitelist .plan { &__title { background: $light-11; diff --git a/website/src/css/pages/_pricing.scss b/website/src/css/pages/_pricing.scss index 0a695ac397b..8a64af3c5be 100644 --- a/website/src/css/pages/_pricing.scss +++ b/website/src/css/pages/_pricing.scss @@ -1,3 +1,4 @@ +// stylelint-disable declaration-property-unit-whitelist .pricing-bg { background: url('/bg-hero-d-sp.svg'); z-index: -1; @@ -30,8 +31,8 @@ padding-left: 42px; padding-right: 42px; @media (max-width: $media-md) { - padding-left: 0px; - padding-right: 0px; + padding-left: 0; + padding-right: 0; } } h1 { @@ -64,7 +65,7 @@ transition: all 300ms ease; &:hover { transition: all 300ms ease; - box-shadow: 0px 0px 4px 1px rgba(13, 69, 255, 0.4); + box-shadow: 0 0 4px 1px rgba(13, 69, 255, 0.4); } @media screen and (max-width: $media-md) { margin-bottom: 1rem; @@ -82,7 +83,7 @@ transition: all 300ms ease; &:hover { transition: all 300ms ease; - box-shadow: 0px 0px 4px 1px rgba(178, 0, 248, 0.4); + box-shadow: 0 0 4px 1px rgba(178, 0, 248, 0.4); } @media screen and (max-width: $media-md) { margin-left: 0; @@ -109,13 +110,6 @@ } .pricing-card-col { - - &:nth-child(2) { - - } - &:nth-child(3) { - - } &:first-of-type { .card-body { h2 { @@ -135,7 +129,7 @@ margin: 8vh 0.5rem 2rem 0.5rem; padding: 0 1rem 1.5rem 1.5rem; background-color: rgba(245, 245, 245, 0.82); - box-shadow: rgba(110, 132, 152, 0.2) 0px 0px 0px 2px; + box-shadow: rgba(110, 132, 152, 0.2) 0 0 0 2px; -webkit-backdrop-filter: saturate(160%) blur(10px); backdrop-filter: saturate(160%) blur(10px); text-align: left; @@ -175,12 +169,11 @@ width: 124px; margin-left: calc(50% - 60px); &:hover { - box-shadow: 0px 0px 8px 1px rgba(13, 151, 255, 0.45); + box-shadow: 0 0 8px 1px rgba(13, 151, 255, 0.45); } @media screen and (max-width: $media-md) { width: calc(100% - 8px); margin-left: 0; - } } .features { @@ -208,7 +201,7 @@ } .contact { - margin-right: 0px; + margin-right: 0; text-align: center; padding-top: 3rem; @media (max-width: $media-md) { @@ -278,10 +271,6 @@ } } } - .pricing-true-up-notice { - padding-left: 23px; - padding-right: 23px; - } } .list-section { background-color: #fafcff; @@ -339,9 +328,9 @@ .feature-table-header { overflow: hidden; position: sticky; - top: 0px; + top: 0; padding-top: 2.5rem; - padding-bottom: .5rem; + padding-bottom: 0.5rem; z-index: 999; -webkit-border-image: -webkit-gradient( linear, @@ -352,7 +341,8 @@ color-stop(0%, #00b3f8), color-stop(50%, #b200f8), color-stop(100%, #f96216) - ) 0 0 3 0 repeat repeat; + ) + 0 0 3 0 repeat repeat; border-image: -webkit-gradient( linear, left top, @@ -362,7 +352,8 @@ color-stop(0%, #00b3f8), color-stop(50%, #b200f8), color-stop(100%, #f96216) - ) 0 0 3 0 repeat repeat; + ) + 0 0 3 0 repeat repeat; background-color: #fafcff; border-bottom: 3px solid; div h4 { diff --git a/website/src/css/styles.scss b/website/src/css/styles.scss index 2d728b8344f..42ee620c381 100644 --- a/website/src/css/styles.scss +++ b/website/src/css/styles.scss @@ -1,3 +1,6 @@ +// stylelint-disable declaration-property-unit-whitelist +// stylelint-disable selector-max-id + $media-sm: 576px; $media-md: 768px; $media-lg: 992px; @@ -430,7 +433,6 @@ a { @import 'components/Header'; @import 'components/Footer'; -@import 'components/NavigationTabs'; @import 'components/Testimonials'; @import 'pages/404'; @import 'pages/about'; diff --git a/website/src/pages/pricing.tsx b/website/src/pages/pricing.tsx index 4640096863a..00303c5b811 100644 --- a/website/src/pages/pricing.tsx +++ b/website/src/pages/pricing.tsx @@ -225,16 +225,6 @@ export default class Pricing extends React.Component { -
-
- If you exceed your licensed users over the term of your subscription, - Sourcegraph will true up your license at your next renewal. Learn more about{' '} - - Sourcegraph's true-up pricing model - - . -
-
diff --git a/website/yarn.lock b/website/yarn.lock index 044b1e2c8d6..c2e291a1154 100644 --- a/website/yarn.lock +++ b/website/yarn.lock @@ -866,6 +866,15 @@ resolved "https://registry.yarnpkg.com/@sourcegraph/prettierrc/-/prettierrc-2.2.0.tgz#af4a6fcd465b0a39a07ffbd8f2d3414d01e603e8" integrity sha512-kRdHxdAppxYnN7qAQjNTyuG05pjYHFtEUquZauXVXBeaGB4sye3uSkb8wgi34jeaUHG/gWp2f5hQgCCBMizjjA== +"@sourcegraph/stylelint-config@^1.1.2": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@sourcegraph/stylelint-config/-/stylelint-config-1.1.2.tgz#e96ca72f9f0ec0d5bcdeb64882e20461078d991d" + integrity sha512-yfiHTJOblsVXlNPKHNeC7L12TEg2pWNhzdDsvaInew7StXLiHMkvQCWdRNd0FrLsU02Gl6bqErk4g2uzJIqLoQ== + dependencies: + stylelint-config-prettier "^5.0.0" + stylelint-config-standard "^18.2.0" + stylelint-scss "^3.3.0" + "@sourcegraph/tslint-config@^13.0.0": version "13.0.0" resolved "https://registry.yarnpkg.com/@sourcegraph/tslint-config/-/tslint-config-13.0.0.tgz#f75d2ea51972c9f8cab233de98824b954457729b" @@ -11523,7 +11532,7 @@ stylelint-config-standard@^18.2.0: dependencies: stylelint-config-recommended "^2.1.0" -stylelint-scss@^3.1.0: +stylelint-scss@^3.1.0, stylelint-scss@^3.3.0: version "3.5.4" resolved "https://registry.yarnpkg.com/stylelint-scss/-/stylelint-scss-3.5.4.tgz#ff3ee989ac48f5c4f57313523b5ace059ffd6cc2" integrity sha512-hEdEOfFXVqxWcUbenBONW/cAw5cJcEDasY8tGwKNAAn1GDHoZO1ATdWpr+iIk325mPGIQqVb1sUxsRxuL70trw==