mirror of
https://github.com/shoelace-style/webawesome.git
synced 2026-01-12 12:09:26 +00:00
Split out mobile page styles
Now each `*.styles.ts` file has a single default export
This commit is contained in:
13
src/components/page/page.mobile.styles.ts
Normal file
13
src/components/page/page.mobile.styles.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
export default (breakpoint: number) => `
|
||||
@media screen and (
|
||||
max-width: ${(Number.isSafeInteger(breakpoint) ? breakpoint.toString() : '768') + 'px'}
|
||||
) {
|
||||
[part~='navigation'] {
|
||||
display: none;
|
||||
}
|
||||
|
||||
:host(:not([disable-navigation-toggle])) slot[name~='navigation-toggle'] {
|
||||
display: contents;
|
||||
}
|
||||
}
|
||||
`;
|
||||
@@ -260,17 +260,3 @@ export default css`
|
||||
margin-inline-start: var(--wa-space-m);
|
||||
}
|
||||
`;
|
||||
|
||||
export const mobileStyles = (breakpoint: number) => `
|
||||
@media screen and (
|
||||
max-width: ${(Number.isSafeInteger(breakpoint) ? breakpoint.toString() : '768') + 'px'}
|
||||
) {
|
||||
[part~='navigation'] {
|
||||
display: none;
|
||||
}
|
||||
|
||||
:host(:not([disable-navigation-toggle])) slot[name~='navigation-toggle'] {
|
||||
display: contents;
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
@@ -4,7 +4,8 @@ import { html, isServer } from 'lit';
|
||||
import { live } from 'lit/directives/live.js';
|
||||
import { unsafeHTML } from 'lit/directives/unsafe-html.js';
|
||||
import componentStyles from '../../styles/component.styles.js';
|
||||
import styles, { mobileStyles } from './page.styles.js';
|
||||
import mobileStyles from './page.mobile.styles.js';
|
||||
import styles from './page.styles.js';
|
||||
import WebAwesomeElement from '../../internal/webawesome-element.js';
|
||||
import type { CSSResultGroup, PropertyValues } from 'lit';
|
||||
import type WaDrawer from '../drawer/drawer.js';
|
||||
|
||||
Reference in New Issue
Block a user