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

chore: align style use between docs and demo #1862

Merged
merged 10 commits into from
Sep 16, 2024
2 changes: 1 addition & 1 deletion .pfe.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"description": "Red Hat Design System",
"componentSubpath": "elements",
"stylesheets": [
"/docs/styles/demo/styles.css"
"/docs/styles/demo/dev-server.css"
zeroedin marked this conversation as resolved.
Show resolved Hide resolved
]
}
}
50 changes: 50 additions & 0 deletions docs/styles/demo/dev-server.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
@layer
demo,
base,
layout,
third-party;

@import url('demo.css') layer(demo);
@import url('../third-party/prism-rhds.css') layer(third-party);

@layer base {
/**
* PFE based styles as we do not have control over the
* html layout that is upstream with no current override
*/
#main-header {
--pf-theme--color--surface--accent: black;
--pf-theme--color--accent: black;
}
}

@layer layout {
html,
body,
main { height: 100%; }

[data-demo] {
display: contents;
}

main {
display: block;
position: relative;
max-height: initial;
}

#nav {
height: 100%;
}

#main-header a img {
margin-right: 0;
}

/* offset the padding on the demo container from above */
rh-context-demo {
min-height: calc(100% + 2 * var(--rh-space-xl, 24px));
height: auto;
}
}

46 changes: 1 addition & 45 deletions docs/styles/demo/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,54 +2,10 @@
reset,
fonts,
tokens,
typography,
base,
layout,
third-party;
typography;

@import url('../reset.css') layer(reset);
@import url('../fonts.css') layer(fonts);
@import url('/assets/packages/@rhds/tokens/css/global.css') layer(tokens);
@import url('../typography.css') layer(typography);
@import url('../third-party/prism-rhds.css') layer(third-party);

@layer base {
/**
* PFE based styles as we do not have control over the
* html layout that is upstream with no current override
*/
#main-header {
--pf-theme--color--surface--accent: black;
--pf-theme--color--accent: black;
}
}

@layer layout {
html,
body,
main { height: 100%; }

[data-demo] {
display: contents;
}

main {
display: block;
position: relative;
max-height: initial;
}

#nav {
height: 100%;
}

#main-header a img {
margin-right: 0;
}

/* offset the padding on the demo container from above */
rh-context-demo {
min-height: calc(100% + 2 * var(--rh-space-xl, 24px));
height: auto;
}
}
Loading