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

docs: remove no longer needed class name from grid example #3554

Merged
merged 1 commit into from
Jul 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
7 changes: 1 addition & 6 deletions frontend/demo/component/grid/grid-styling.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,7 @@ export class Example extends LitElement {

protected override render() {
return html`
<vaadin-grid
.items="${this.items}"
.cellPartNameGenerator="${this.cellPartNameGenerator}"
class="styling"
>
<vaadin-grid-column path="firstName"></vaadin-grid-column>
<vaadin-grid .items="${this.items}" .cellPartNameGenerator="${this.cellPartNameGenerator}">
<vaadin-grid-column path="lastName"></vaadin-grid-column>
<vaadin-grid-column path="profession"></vaadin-grid-column>
<vaadin-grid-column
Expand Down
2 changes: 1 addition & 1 deletion frontend/demo/component/grid/react/grid-styling.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ function Example() {
}, []);

return (
<Grid items={items.value} cellPartNameGenerator={cellPartNameGenerator} className="styling">
<Grid items={items.value} cellPartNameGenerator={cellPartNameGenerator}>
<GridColumn path="firstName" />
<GridColumn path="lastName" />
<GridColumn path="profession" />
Expand Down
10 changes: 3 additions & 7 deletions frontend/themes/docs/grid-styling.css
Original file line number Diff line number Diff line change
@@ -1,18 +1,14 @@
/* Add this to your global CSS, for example in: */
/* frontend/theme/[my-theme]/styles.css */

vaadin-grid.styling::part(high-rating) {
vaadin-grid::part(high-rating) {
background-color: var(--lumo-success-color-10pct);
}

vaadin-grid.styling::part(low-rating) {
vaadin-grid::part(low-rating) {
background-color: var(--lumo-error-color-10pct);
}

vaadin-grid.styling::part(loading-row-cell) {
background-color: var(--lumo-base-color);
}

vaadin-grid.styling::part(font-weight-bold) {
vaadin-grid::part(font-weight-bold) {
font-weight: bold;
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ public class GridStyling extends Div {
public GridStyling() {
// tag::snippet[]
Grid<PersonWithRating> grid = new Grid<>(PersonWithRating.class, false);
grid.addClassName("styling");
grid.addColumn(PersonWithRating::getFirstName).setHeader("First name");
grid.addColumn(PersonWithRating::getLastName).setHeader("Last name");
grid.addColumn(PersonWithRating::getProfession).setHeader("Profession");
Expand Down
Loading