Skip to content

Commit

Permalink
Move stylesheets into src directory (#43727)
Browse files Browse the repository at this point in the history
  • Loading branch information
heiskr authored Oct 5, 2023
1 parent 3fa06dc commit 3da32a7
Show file tree
Hide file tree
Showing 28 changed files with 100 additions and 168 deletions.
1 change: 0 additions & 1 deletion .github/workflows/azure-preview-env-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,6 @@ jobs:
rsync -rptovR --ignore-missing-args ./user-code/lib/./**/*.{js,ts} ./lib
rsync -rptovR --ignore-missing-args ./user-code/middleware/./**/*.{js,ts} ./middleware
rsync -rptovR ./user-code/src/./**/*.tsx ./src
rsync -rptovR ./user-code/stylesheets/./**/*.scss ./stylesheets
- uses: ./.github/actions/warmup-remotejson-cache
with:
Expand Down
1 change: 0 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ RUN npm prune --production
# ---------------
FROM all_deps as builder

COPY stylesheets ./stylesheets
COPY components ./components
COPY lib ./lib
COPY src ./src
Expand Down
2 changes: 1 addition & 1 deletion components/article/ArticleInlineLayout.module.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@import "@primer/css/support/variables/layout.scss";
@import "@primer/css/support/mixins/layout.scss";
@import "stylesheets/breakpoint-xxl.scss";
@import "src/frame/stylesheets/breakpoint-xxl.scss";

.containerBox {
max-width: 720px;
Expand Down
2 changes: 1 addition & 1 deletion components/ui/MarkdownContent/stylesheets/table.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import "stylesheets/breakpoint-xxl.scss";
@import "src/frame/stylesheets/breakpoint-xxl.scss";

.markdownBody {
table {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,5 +96,4 @@ For more information about using a codespace for working on {% data variables.pr
- [Data](https://github.com/github/docs/blob/main/data/README.md)
- [Middleware](https://github.com/github/docs/blob/main/middleware/README.md)
- [Scripts](https://github.com/github/docs/blob/main/script/README.md)
- [Styles](https://github.com/github/docs/blob/main/stylesheets/README.md)
- [Tests](https://github.com/github/docs/blob/main/tests/README.md)
2 changes: 0 additions & 2 deletions contributing/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,6 @@ For more info about working with this site, check out these READMEs:
- [includes/README.md](../includes/README.md)
<!-- The following will be moved into src directory over time: -->
- [components/README.md](../components/README.md)
- [lib/liquid-tags/README.md](../lib/liquid-tags/README.md)
- [middleware/README.md](../middleware/README.md)
- [script/README.md](../script/README.md)
- [stylesheets/README.md](../stylesheets/README.md)
- [tests/README.md](../tests/README.md)
1 change: 0 additions & 1 deletion nodemon.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"ignore": [
"assets",
"script",
"stylesheets",
"tests",
"content",
"translations",
Expand Down
2 changes: 1 addition & 1 deletion src/assets/scripts/find-orphaned-assets.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ async function main(opts) {
}
}

const roots = ['tests', 'components', 'script', 'stylesheets', 'contributing', 'src', 'assets']
const roots = ['tests', 'components', 'script', 'contributing', 'src', 'assets']

for (const root of roots) {
sourceFiles.push(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import "stylesheets/breakpoint-xxl.scss";
@import "src/frame/stylesheets/breakpoint-xxl.scss";

/* Code annotations
----------------------------------------------------------------------------*/
Expand Down
File renamed without changes.
File renamed without changes.
6 changes: 6 additions & 0 deletions src/content-render/stylesheets/index.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
@import "annotate.scss";
@import "heading-links.scss";
@import "images.scss";
@import "markdown-overrides.scss";
@import "spotlight.scss";
@import "syntax-highlighting.scss";
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
18 changes: 5 additions & 13 deletions stylesheets/index.scss → src/frame/stylesheets/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,11 @@
@import "@primer/css/alerts/index.scss";
@import "@primer/css/popover/index.scss";

// Primer and native tag overrides
@import "headings.scss";
@import "markdown-overrides.scss";
@import "images.scss";
@import "scroll-button.scss";
@import "scroll-top.scss";

// Components
@import "heading-links.scss";
@import "syntax-highlighting.scss";
@import "spotlight.scss";
@import "annotate.scss";
@import "hover-card.scss";

// Utility classes
@import "utilities.scss";
@import "shadows.scss";
@import "utilities.scss";

@import "src/content-render/stylesheets/index.scss";
@import "src/links/stylesheets/hover-card.scss";
11 changes: 11 additions & 0 deletions src/frame/stylesheets/scroll-button.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
.transition-200 {
transition: 200ms;
}

.opacity-0 {
opacity: 0;
}

.opacity-100 {
opacity: 1;
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import "stylesheets/breakpoint-xxl.scss";
@import "src/frame/stylesheets/breakpoint-xxl.scss";

// https://tetralogical.com/blog/2023/06/08/focus-in-view/

Expand Down
File renamed without changes.
70 changes: 70 additions & 0 deletions src/frame/stylesheets/utilities.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
@import "src/frame/stylesheets/breakpoint-xxl.scss"; // for d-xxl-block and d-xxl-none

@media print {
.no-print {
display: none;
}
}

.z-1 {
z-index: 1;
}

.z-2 {
z-index: 2;
}

.z-3 {
z-index: 3;
}

.max-w-xs {
max-width: 20rem;
}

.min-h-screen {
min-height: 100vh;
}

.visually-hidden {
border: 0;
clip: rect(0 0 0 0);
height: 1px;
margin: -1px;
overflow: hidden;
padding: 0;
position: absolute !important;
width: 1px;
}

// For the screenreader
.skip-button {
width: auto;
height: auto;
clip: auto;
overflow: hidden;
z-index: 101;
padding: 16px;

&:not(:focus) {
clip: rect(1px, 1px, 1px, 1px);
clip-path: inset(50%);
height: 1px;
width: 1px;
margin: -1px;
padding: 0px;
}
}

// used to help prevent overlapping main content and the minitoc sidebar
.d-xxl-block {
@include breakpoint-xxl {
display: block !important;
}
}

.d-xxl-none {
@include breakpoint-xxl {
display: none !important;
}
}
2 changes: 1 addition & 1 deletion src/landings/components/ProductArticlesList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const ProductTreeNodeList = ({ treeNode }: { treeNode: ProductTreeNode }) => {
return (
<div className="col-12 col-lg-4 mb-6 height-full">
<h3 className="mb-3 f4">
<Link className="color-unset text-underline" href={treeNode.href}>
<Link className="text-underline" href={treeNode.href}>
{treeNode.title}
</Link>
</h3>
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/pages/_app.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import 'stylesheets/index.scss'
import 'src/frame/stylesheets/index.scss'

export { default } from 'src/frame/pages/app'
2 changes: 1 addition & 1 deletion src/release-notes/components/PatchNotes.module.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@import "@primer/css/support/variables/layout.scss";
@import "@primer/css/support/mixins/layout.scss";
@import "stylesheets/breakpoint-xxl.scss";
@import "src/frame/stylesheets/breakpoint-xxl.scss";

.aside {
@include breakpoint(md) {
Expand Down
141 changes: 0 additions & 141 deletions stylesheets/utilities.scss

This file was deleted.

0 comments on commit 3da32a7

Please sign in to comment.