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

Grid PartNameGenerator sample has unnecessary classname #3442

Closed
jflamy opened this issue May 22, 2024 · 3 comments · Fixed by #3554
Closed

Grid PartNameGenerator sample has unnecessary classname #3442

jflamy opened this issue May 22, 2024 · 3 comments · Fixed by #3554
Assignees

Comments

@jflamy
Copy link

jflamy commented May 22, 2024

Description of the bug

On page https://vaadin.com/docs/latest/components/grid#part-name-generator
The css example given uses as selector
vaadin-grid.styling::part(high-rating)

I followed the directions to put this in my theme styles.css file, I had to remove the .styling part for this to work in version 24.3.12,

Expected behavior

The example should work.

Minimal reproducible example

See description

Versions

  • Vaadin / Flow version: 24.3.12
  • Browser: Chrome
@mcollovati mcollovati transferred this issue from vaadin/flow May 22, 2024
@rolfsmeds
Copy link
Contributor

The styling example is actually correct. You missed that the Grid in the sample has the classname styling applied to it, and also used in the css selectors.

However, this is an unnecessary complication of the sample, and should be addressed (by removing the .styling classname from the selectors).

There is also a workaround in the sample for an issue in the way part names are applied, which should be fixed in the Grid component itself: vaadin/web-components#7447

@jflamy
Copy link
Author

jflamy commented May 25, 2024

Using "styling" as a class name for a grid was not exactly intuitive :-)

@jflamy jflamy closed this as completed May 25, 2024
@rolfsmeds
Copy link
Contributor

Keeping this open so we remember to remove the classname selector from the sample (and remove the classname entirely when vaadin/web-components#7447 has been fixed).

@rolfsmeds rolfsmeds reopened this May 27, 2024
@rolfsmeds rolfsmeds changed the title Documentation - error in grid styling example Grid PartNameGenerator sample has unnecessary classname May 27, 2024
@web-padawan web-padawan self-assigned this Jul 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants