Skip to content

Commit 9f8f6af

Browse files
Fix print CSS for containers. Bump PRR for docs (#1261)
* Fix print CSS for containers. Bump PRR for docs
1 parent 7ca4bfd commit 9f8f6af

File tree

9 files changed

+851
-357
lines changed

9 files changed

+851
-357
lines changed

.changeset/young-poems-poke.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
'spectacle': patch
3+
'spectacle-docs': patch
4+
---
5+
6+
Fixed print CSS for container components. Update PRR for docs.

.github/workflows/docs.yml

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -64,19 +64,6 @@ jobs:
6464
env:
6565
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6666

67-
- name: Deploy docs (staging)
68-
if: github.ref != 'refs/heads/main'
69-
working-directory: ./website
70-
run: pnpm deploy:stage
71-
env:
72-
# GH actions have a PR merge commit that _isn't_ our actual commits.
73-
# Manually infer correct branch and sha for pull requests.
74-
FORMIDEPLOY_GIT_SHA: ${{ github.event.pull_request.head.sha }}
75-
FORMIDEPLOY_PULL_REQUEST: ${{ steps.pr_info.outputs.pull_request_number }}
76-
GITHUB_DEPLOYMENT_TOKEN: ${{ secrets.GITHUB_TOKEN }}
77-
SURGE_LOGIN: ${{ secrets.SURGE_LOGIN }}
78-
SURGE_TOKEN: ${{ secrets.SURGE_TOKEN }}
79-
8067
- name: Deploy docs (production)
8168
if: github.ref == 'refs/heads/main'
8269
working-directory: ./website

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
"ts-jest": "^29.0.3",
4040
"typescript": "^4.8.4",
4141
"wait-on": "^6.0.1",
42-
"webpack": "^5.68.0",
42+
"webpack": "5.76.0",
4343
"webpack-cli": "^4.10.0",
4444
"webpack-dev-server": "^4.11.1",
4545
"wireit": "^0.7.2"

packages/spectacle/src/components/layout-primitives.ts

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
11
import styled from 'styled-components';
2+
3+
const containerPrintStyle = `
4+
@media print {
5+
height: inherit;
6+
}
7+
`;
8+
29
import {
310
compose,
411
grid,
@@ -18,11 +25,13 @@ type BoxProps = SS.LayoutProps &
1825
SS.BorderProps;
1926

2027
const Box = styled.div<BoxProps>(
21-
compose(layout, space, position, color, border)
28+
compose(layout, space, position, color, border),
29+
containerPrintStyle
2230
);
2331

2432
const FlexBox = styled.div<BoxProps & SS.FlexboxProps>(
25-
compose(layout, space, position, color, border, flexbox)
33+
compose(layout, space, position, color, border, flexbox),
34+
containerPrintStyle
2635
);
2736

2837
FlexBox.defaultProps = {
@@ -32,7 +41,10 @@ FlexBox.defaultProps = {
3241
};
3342

3443
type GridProps = SS.LayoutProps & SS.GridProps & SS.PositionProps;
35-
const Grid = styled.div<GridProps>(compose(layout, grid, position));
44+
const Grid = styled.div<GridProps>(
45+
compose(layout, grid, position),
46+
containerPrintStyle
47+
);
3648

3749
Grid.defaultProps = {
3850
display: 'grid'

0 commit comments

Comments
 (0)