Skip to content

Commit

Permalink
style: improve print design for details component (#711)
Browse files Browse the repository at this point in the history
* style: improve print design for details component

* style: improve print design for details component
  • Loading branch information
melaniebmn authored Dec 17, 2024
1 parent ab1c12b commit e68a3bf
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 6 deletions.
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"@babel/core": "^7.20.12",
"@babel/preset-env": "^7.20.2",
"@babel/preset-typescript": "^7.21.0",
"@cdssnc/gcds-tokens": "^2.0.2",
"@cdssnc/gcds-tokens": "^2.0.3",
"@fortawesome/fontawesome-free": "^6.3.0",
"@stencil/angular-output-target": "file:../../utils/angular-output-target",
"@stencil/postcss": "^2.1.0",
Expand Down
25 changes: 24 additions & 1 deletion packages/web/src/components/gcds-details/gcds-details.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@layer reset, default, hover, focus;
@layer reset, default, hover, focus, print;

@layer reset {
:host {
Expand Down Expand Up @@ -151,3 +151,26 @@
text-decoration: none;
}
}

@layer print {
/* Display details component open by default for print */
@media print {
:host .gcds-details {
.details__summary{
font-weight: var(--gcds-details-print-summary-font-weight);
text-decoration: none;
color: var(--gcds-details-print-summary-text);

&:before {
transform: rotate(90deg);
}
}

.details__panel {
display: block;
/* Note: Logical properties are not yet supported in print */
border-left: var(--gcds-details-panel-border-width) solid var(--gcds-details-panel-border-color);
}
}
}
}

0 comments on commit e68a3bf

Please sign in to comment.