From 48b8711cbd1187ad4e81ae8283f3baab227faf80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juliana=20Pe=C3=B1a?= Date: Mon, 22 Feb 2021 16:28:28 -0800 Subject: [PATCH] web: move Percy-specific CSS to Percy config file (#18551) Percy is [failing the build intermittently](https://percy.io/Sourcegraph/Sourcegraph/builds/8974887/changed/508960393?browser=chrome&browser_ids=16&subcategories=unreviewed%2Cchanges_requested&viewLayout=side-by-side&viewMode=new&width=1920&widths=960%2C1920) due to rendering the Monaco cursor. We were previously successfully hiding the Monaco cursor using `@media only percy` CSS but that isn't working anymore. I have opened a support request with the Percy/Browserstack team but I'm trying this in the meantime to see if it resolves our issue. Percy documentation: https://docs.percy.io/docs/percy-specific-css --- .percy.yml | 5 +++++ client/web/src/SourcegraphWebApp.scss | 8 -------- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/.percy.yml b/.percy.yml index 384ef594528..c0d4d933755 100644 --- a/.percy.yml +++ b/.percy.yml @@ -3,3 +3,8 @@ snapshot: widths: - 960 # Half-width browser window (e.g. docked to the side next to an editor) - 1920 # Full-width browser window + percy-css: | + .percy-hide, + .monaco-editor .cursor { + visibility: hidden !important; + } diff --git a/client/web/src/SourcegraphWebApp.scss b/client/web/src/SourcegraphWebApp.scss index 5e9e9c7dae4..5330c66d0a4 100644 --- a/client/web/src/SourcegraphWebApp.scss +++ b/client/web/src/SourcegraphWebApp.scss @@ -72,14 +72,6 @@ body, min-width: 0; } -// Hide the given element from Percy. -.percy-hide, -.monaco-editor .cursor { - @media only percy { - visibility: hidden !important; - } -} - // Pages @import './Layout'; @import './api/ApiConsole';