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 aspect-ratio as default valid property #317

Closed
wants to merge 1 commit into from
Closed

Add aspect-ratio as default valid property #317

wants to merge 1 commit into from

Conversation

karlhorky
Copy link

@karlhorky karlhorky commented Nov 21, 2022

Hi, thanks for this repo 🙌 (and all of the other packages and projects that make up the Microsoft developer tooling ecosystem). Really amazing.

A quick PR to avoid the problem that aspect-ratio is not recognized as a valid property via typescript-styled-plugin and vscode-styled-components:

Screenshot 2022-11-21 at 14 05 28

Coming over from:

aspect-ratio docs:
https://developer.mozilla.org/en-US/docs/Web/CSS/aspect-ratio

cc @mjbvz @aeschli

@karlhorky
Copy link
Author

karlhorky commented Nov 21, 2022

Or should this be updated over in microsoft/vscode-custom-data/web-data, eg here?

https://github.com/microsoft/vscode-custom-data/blob/main/web-data/css/css-schema.xml

Seems like this file is being used to generate data for...something here:

https://github.com/microsoft/vscode-custom-data/blob/fce2045d6f693c12bf0848ec3602fc433f70d7da/web-data/css/generateData.js#L327-L369

cc @addiment

@addiment
Copy link

addiment commented Nov 21, 2022

I'm no expert here (I hardly understand VS Code's architecture, I just happened to have a similar-ish problem once) but I think(?) that vscode-custom-data is the right place. This is with React, so maybe it's a little different, but I think you're on the right track.

@aeschli
Copy link
Contributor

aeschli commented Nov 22, 2022

Yes, the update has to happen in https://github.com/microsoft/vscode-custom-data.
In fact the latest version (@vscode/web-custom-data@0.4.4)there has aspect-ratio, so all we need it to adopt it..

(Run npm run update-data)

@karlhorky
Copy link
Author

karlhorky commented Nov 22, 2022

In fact the latest version (@vscode/web-custom-data@0.4.4)there has aspect-ratio, so all we need it to adopt it..

Oh that's great! So this npm run update-data needs to be run in microsoft/vscode-css-languageservice, and then the result committed 👍

@aeschli
Copy link
Contributor

aeschli commented Nov 22, 2022

#319 updated all dependencies, including vscode-custom-data

@aeschli aeschli closed this Nov 22, 2022
@karlhorky
Copy link
Author

Amazing, thanks so much @aeschli ! 🙌

@karlhorky
Copy link
Author

karlhorky commented Dec 9, 2022

Copying part of my comment in styled-components/typescript-styled-plugin over here for visibility:

Seems like this is actually fixed in the normal release version of styled-components.vscode-styled-components@1.7.5 already, when using VS Code 1.74.0 (the error + warning below is actually a real typo, just to test that the error checking is working):

Screenshot 2022-12-09 at 18 06 40

@aeschli aeschli added this to the November 2022 milestone Dec 12, 2022
@karlhorky
Copy link
Author

karlhorky commented Dec 14, 2022

Ran into the problem with a different CSS property just now - accent-color doesn't appear to work, in either the normal styled-components.vscode-styled-components@1.7.5 Release version or the styled-components.vscode-styled-components@1.7.6 Pre-Release version (see below).

Maybe the property is too new and not yet in the vscode-css-languageservice data?

The error message is "Unknown property: 'accent-color".

Screenshot 2022-12-14 at 16 39 17

Screenshot 2022-12-14 at 16 38 50

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.

3 participants