Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prepare main to hold code for next major version #1599

Merged
merged 29 commits into from
Sep 17, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
a03b7d1
Adding pre mode
jonrohan May 12, 2021
10d5922
Updating the workflows
jonrohan May 12, 2021
689b8a8
Update README.md
jonrohan May 13, 2021
ca4c082
Create proud-rules-wonder.md
jonrohan May 13, 2021
e3fd8d2
Merge pull request #1401 from primer/jonrohan-patch-1
jonrohan May 13, 2021
79399b3
Merge branch 'main' into next_major
jonrohan Jun 15, 2021
6e47bf5
Merge branch 'main' into next_major
jonrohan Jun 15, 2021
32040ff
Rename and move color mode variables out of base package (#1462)
jonrohan Jun 16, 2021
5134482
Remove test
jonrohan Jun 16, 2021
bcc2e3b
Delete patch
jonrohan Jun 16, 2021
53685d8
Moving color modes to their own bundle (#1465)
jonrohan Jun 18, 2021
689119a
Merge branch 'main' into next_major
jonrohan Aug 19, 2021
d64dac7
Merge branch 'main' into next_major
jonrohan Aug 19, 2021
d24d382
Removing the rem() mixin and usages. Placing the computed values in p…
jonrohan Aug 23, 2021
d2d2576
Merge branch 'main' into next_major
jonrohan Sep 3, 2021
5056452
Merge branch 'main' into next_major
jonrohan Sep 3, 2021
c3a938f
Fixing stylelint issues
jonrohan Sep 3, 2021
ac70c26
Fix more stylelint issue
jonrohan Sep 3, 2021
816a5d5
Remove break-word from utilities (#1566)
jonrohan Sep 6, 2021
0c13c27
Merge branch 'main' into next_major
jonrohan Sep 7, 2021
d0d5640
Adding dark high contrast
jonrohan Sep 7, 2021
649c35a
Fixing mising color modes selectors
jonrohan Sep 7, 2021
2c9f011
Merge branch 'main' into next_major
jonrohan Sep 8, 2021
93606db
Remove pre.json if it exists
jonrohan Sep 8, 2021
8c875a4
Merge branch 'main' into next_major
simurai Sep 9, 2021
f4d75b1
Merge branch 'main' into next_major
jonrohan Sep 13, 2021
c5bb82f
Fixing lint error
jonrohan Sep 13, 2021
3a9f44a
Merge branch 'main' into next_major
jonrohan Sep 17, 2021
f572fe6
Removing pre mode
jonrohan Sep 17, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/flat-shirts-lay.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@primer/css": major
---

Removing the rem() mixin and usages. Placing the computed values in place.
5 changes: 5 additions & 0 deletions .changeset/mighty-goats-teach.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@primer/css": major
---

Rename `modes.scss` file to `color-modes.scss` and move from the `base/` folder to the `support/variables` folder.
5 changes: 5 additions & 0 deletions .changeset/new-beers-peel.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@primer/css": major
---

Moving color modes to their own bundle, `./color-modes/` and separates color mode themes into their own scss file.
5 changes: 5 additions & 0 deletions .changeset/twelve-fireants-shave.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@primer/css": major
---

Remove break-word from utilities
1 change: 1 addition & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ on:
push:
branches:
- 'main'
- 'next_major'
jobs:
release:
name: Final
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/release_canary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ on:
push:
branches-ignore:
- 'main'
- 'changeset-release/main'
- 'changeset-release/**'
- 'dependabot/**'
# Don't release canary when these paths change
# It's not necessary because we don't ship them and it creates noise
Expand Down Expand Up @@ -50,6 +50,7 @@ jobs:
run: |
echo "$( jq '.version = "0.0.0"' package.json )" > package.json
echo -e "---\n'@primer/css': patch\n---\n\nFake entry to force publishing" > .changeset/force-snapshot-release.md
rm -f .changeset/pre.json
yarn changeset version --snapshot
yarn changeset publish --tag canary
env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release_candidate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Release
on:
push:
branches:
- 'changeset-release/main'
- 'changeset-release/**'

jobs:
release-candidate:
Expand Down
1 change: 0 additions & 1 deletion src/base/index.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
@import "../support/index.scss";

@import "./normalize.scss";
@import "./modes.scss";
@import "./base.scss";
@import "./kbd.scss";
@import "./typography-base.scss";
Expand Down
41 changes: 0 additions & 41 deletions src/base/modes.scss

This file was deleted.

7 changes: 7 additions & 0 deletions src/color-modes/index.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// All themes

@import "./themes/light.scss";
@import "./themes/dark.scss";
@import "./themes/dark_dimmed.scss";
@import "./themes/dark_high_contrast.scss";
@import "./native.scss";
10 changes: 10 additions & 0 deletions src/color-modes/native.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// color-scheme
// Enables color modes for native elements

@include color-mode(light) { color-scheme: light; }
@include color-mode(dark) { color-scheme: dark; }

[data-color-mode] {
color: var(--color-fg-default);
background-color: var(--color-canvas-default);
}
7 changes: 7 additions & 0 deletions src/color-modes/themes/dark.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
@import "../../support/index.scss";

@import "@primer/primitives/dist/scss/colors/_dark.scss";

@include color-mode-theme(dark) {
@include primer-colors-dark;
}
7 changes: 7 additions & 0 deletions src/color-modes/themes/dark_dimmed.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
@import "../../support/index.scss";

@import "@primer/primitives/dist/scss/colors/_dark_dimmed.scss";

@include color-mode-theme(dark_dimmed) {
@include primer-colors-dark_dimmed;
}
7 changes: 7 additions & 0 deletions src/color-modes/themes/dark_high_contrast.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
@import "../../support/index.scss";

@import "@primer/primitives/dist/scss/colors/_dark_high_contrast.scss";

@include color-mode-theme(dark_high_contrast) {
@include primer-colors-dark_high_contrast;
}
7 changes: 7 additions & 0 deletions src/color-modes/themes/light.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
@import "../../support/index.scss";

@import "@primer/primitives/dist/scss/colors/_light.scss";

@include color-mode-theme(light, true) {
@include primer-colors-light;
}
3 changes: 3 additions & 0 deletions src/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
// Imports all Primer files in their intended order for easy mass-inclusion.
// Should you need specific files, you can easily use separate `@import`s.

// CSS color variables
@import "./color-modes/index.scss";

// Global requirements
@import "./core/index.scss";
@import "./product/index.scss";
Expand Down
8 changes: 4 additions & 4 deletions src/marketing/buttons/button.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
display: inline-block;
appearance: none !important;
// stylelint-disable-next-line primer/spacing
padding: rem(($spacer-3) * 0.9) rem($spacer-4) rem(($spacer-3) * 1.1);
padding: 0.9rem 1.5rem 1.1rem;
// stylelint-disable-next-line primer/typography
font-size: 1rem;
font-weight: $font-weight-bold;
Expand All @@ -14,7 +14,7 @@
user-select: none;
border: 0;
// stylelint-disable-next-line primer/borders
border-radius: rem(6px);
border-radius: 0.375rem;

@include btn-solid-mktg(
var(--color-mktg-btn-text),
Expand All @@ -34,7 +34,7 @@
z-index: -1;
content: "";
// stylelint-disable-next-line primer/borders
border-radius: rem(6px);
border-radius: 0.375rem;
opacity: 0;
transition: opacity 0.4s;
}
Expand Down Expand Up @@ -97,7 +97,7 @@

.btn-small-mktg {
// stylelint-disable-next-line primer/spacing
padding: rem(10px) rem($spacer-3) rem(13px);
padding: 0.625rem 1rem 0.8125rem;
}

.btn-large-mktg {
Expand Down
14 changes: 0 additions & 14 deletions src/marketing/support/mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -64,17 +64,3 @@
opacity: 0.5;
}
}

$browser-context: 16 !default;

@function rem($pixels, $context: $browser-context) {
@if (unitless($pixels)) {
$pixels: $pixels * 1px;
}

@if (unitless($context)) {
$context: $context * 1px;
}

@return $pixels / $context * 1rem;
}
1 change: 0 additions & 1 deletion src/utilities/typography.scss
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,6 @@
.ws-normal { white-space: normal !important; }

/* Force long "words" to wrap if they exceed the width of the container */
.break-word, // deprecated
.wb-break-word {
word-break: break-word !important;
// this is for backwards compatibility with browsers that don't respect overflow-wrap
Expand Down