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

Add note about loading the "latest" Primer CSS version #1784

Merged
merged 3 commits into from
Dec 8, 2021

Conversation

simurai
Copy link
Contributor

@simurai simurai commented Dec 1, 2021

This updates the import of Primer CSS to 19.0.0. Also adds a not in case you want always the "latest" version, with the risk of including breaking changes.

@simurai simurai requested a review from a team as a code owner December 1, 2021 00:52
@changeset-bot
Copy link

changeset-bot bot commented Dec 1, 2021

⚠️ No Changeset found

Latest commit: a281158

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@@ -19,12 +19,14 @@ This method requires no dev environment set up and is useful for when you want t
<head>
<title></title>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="stylesheet" href="https://unpkg.com/@primer/css@^16.0.0/dist/primer.css" />
<link rel="stylesheet" href="https://unpkg.com/@primer/css@^19.0.0/dist/primer.css" />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be possible to import the current version from package.json and interpolate it here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That would be great. Not sure if it's possible inside of these "code examples"? 🤔

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've had a go and it seems you can if you use <code> instead of a md code snippet 🎉

<code class="language-html">
{`<!DOCTYPE html>
<html lang="en">
  <head>
    <title></title>
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <link rel="stylesheet" href="https://unpkg.com/@primer/css@^${packageJson.version}/dist/primer.css" />
  </head>
  <body></body>
</html>`}
</code>

Bit uglier but I think it's preferable to manually updating this page.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep! This works:

image

Awesome! 🙌 It did feel a bit like having to remember to update the year in the footer. 😄

@simurai simurai enabled auto-merge (squash) December 3, 2021 00:11
@simurai simurai disabled auto-merge December 8, 2021 11:30
@simurai simurai merged commit ef2f3f0 into main Dec 8, 2021
@simurai simurai deleted the docs-latest-version branch December 8, 2021 11:47
jonrohan added a commit that referenced this pull request Dec 8, 2021
* Updating and autofixing stylelint

* Moving config to primer/stylelint-config

* Removing unused disables from css

* Stylelint auto-fixes

* @primer/stylelint-config@12.2.0

* Remove these from workfow

* Use reusable release_canary workflow (#1811)

* Use reusable release_canary workflow

* Install with yarn

Co-authored-by: Jon Rohan <yes@jonrohan.codes>

* Use counter-border for LHC (#1792)

* Use counter-border for LHC

* Create orange-ties-sin.md

* Remove fallback

* UnderlineNav `:focus` styles (#1764)

* add pseudo selectors

* adjustments

* add stories, cleanup

* update mixin

* fix mixin

* lint

* add back overflow styles

* adjust focus for better overflow state, scrollsnap

* post test adjustments, move hacks to primer css

* Stylelint auto-fixes

* hover state desktop only

* document data-content hack

* Create nice-days-jog.md

Co-authored-by: Actions Auto Build <actions@github.com>
Co-authored-by: simurai <simurai@github.com>

* Add note about loading the "latest" Primer CSS version (#1784)

* Add stashing

* Stylelint auto-fixes

Co-authored-by: Actions Auto Build <actions@github.com>
Co-authored-by: Cole Bemis <colebemis@github.com>
Co-authored-by: simurai <simurai@github.com>
Co-authored-by: Katie Langerman <langermank@github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants