Skip to content

Instantly share code, notes, and snippets.

@fstbraz
Created August 31, 2022 15:09
Show Gist options
  • Save fstbraz/f6f66d74eb90ad127fec9751744619b6 to your computer and use it in GitHub Desktop.
Save fstbraz/f6f66d74eb90ad127fec9751744619b6 to your computer and use it in GitHub Desktop.
cross-framework-web-components-8
...
import { css, html, LitElement } from 'lit';
import { sharedStyles } from './shared/style';
const componentStyle = css`
.cards > ul {
list-style: none;
margin: 0;
padding: 0;
}
@supports (display: grid) {
.cards > ul {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
grid-column-gap: 1.5rem;
grid-row-gap: 1.5rem;
}
}
`;
@customElement('cards-images')
export class Cards extends LitElement {
static styles = [sharedStyles, componentStyle];
...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment