Skip to content

Commit

Permalink
Merge pull request #43 from OnedocLabs/ffo-173-improve-support-for-da…
Browse files Browse the repository at this point in the history
…rk-selectors-in-react-print

Changes test to check for :is selector
  • Loading branch information
Titou325 authored Aug 22, 2024
2 parents 853b8c2 + 0d88cf0 commit 9b2b5b3
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions tests/compile.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ test("works with tailwind dark", async () => {

const html = await compile(<TestComponent />);

console.log(html);

expect(html).toContain("rgba(239, 68, 68");
expect(html).not.toContain(":is");

Check failure on line 43 in tests/compile.test.tsx

View workflow job for this annotation

GitHub Actions / build-and-publish

tests/compile.test.tsx > works with tailwind dark

AssertionError: expected '<style>/* src/generic.css */\n.hyphen…' not to contain ':is' - Expected + Received - :is + <style>/* src/generic.css */ + .hyphenate { + hyphens: auto; + } + input, + select option { + -prince-pdf-form: enable; + } + + /* src/variables/headings.css */ + h1 { + string-set: onedocH1Contents content(text); + } + h2 { + string-set: onedocH2Contents content(text) onedocH3Contents "" onedocH4Contents "" onedocH5Contents "" onedocH6Contents ""; + } + h3 { + string-set: onedocH3Contents content(text) onedocH4Contents "" onedocH5Contents "" onedocH6Contents ""; + } + h4 { + string-set: onedocH4Contents content(text) onedocH5Contents "" onedocH6Contents ""; + } + h5 { + string-set: onedocH5Contents content(text) onedocH6Contents ""; + } + h6 { + string-set: onedocH6Contents content(text); + } + .onedoc-heading-contents:not(:empty)::before { + content: attr(data-before); + } + .onedoc-heading-contents:not(:empty)::after { + content: attr(data-after); + } + .onedoc-h1-contents:before { + content: string(onedocH1Contents); + } + .onedoc-h2-contents:before { + content: string(onedocH2Contents); + } + .onedoc-h3-contents:before { + content: string(onedocH3Contents); + } + .onedoc-h4-contents:before { + content: string(onedocH4Contents); + } + .onedoc-h5-contents:before { + content: string(onedocH5Contents); + } + .onedoc-h6-contents:before { + content: string(onedocH6Contents); + } + + /* src/variables/variables.css */ + + /* src/shell/shell.css */ + @page { + @top-left { + content: flow(FileforgePageTop); + content: element(FileforgePageTop); + position: relative; + } + @bottom-left { + content: flow(FileforgePageBottom); + content: element(FileforgePageBottom); + position: relative; + } + } + .onedoc-page-top { + position: running(FileforgePageTop) !important; + -prince-flow: static(FileforgePageTop); + width: 100%; + height: 100%; + } + .onedoc-current-page-top { + position: FileforgePageTop; + width: 100%; + height: 100%; + } + .onedoc-page-bottom { + position: running(FileforgePageBottom) !important; + -prince-flow: static(FileforgePageBottom); + width: 100%; + height: 100%; + } + .onedoc-page-break { + page-break-after: always; + } + .onedoc-no-break { + page-break-inside: avoid; + } + + /* src/footnote/footnote.css */ + .onedoc-footnote { + float: footnote; + footnote-style-position: inside; + } + /*# sourceMappingURL=index.css.map */</style><style>*, ::before, ::after { + --tw-border-spacing-x: 0; + --tw-border-spacing-y: 0; + --tw-translate-x: 0; + --tw-translate-y: 0; + --tw-rotate: 0; + --tw-skew-x: 0; + --tw-skew-y: 0; + --tw-scale-x: 1; + --tw-scale-y: 1; + --tw-pan-x: ; + --tw-pan-y: ; + --tw-pinch-zoom: ; + --tw-scroll-snap-strictness: proximity; + --tw-ordinal: ; + --tw-slashed-zero: ; + --tw-numeric-figure: ; + --tw-numeric-spacing: ; + --tw-numeric-fraction: ; + --tw-ring-inset: ; + --tw-ring-offset-width: 0px; + --tw-ring-offset-color: #fff; + --tw-ring-color: rgba(59, 130, 246, 0.5); + --tw-ring-offset-shadow: 0 0 #0000; + --tw-ring-shadow: 0 0 #0000; + --tw-shadow: 0 0 #0000; + --tw-shadow-colored: 0 0 #0000; + --tw-blur: ; + --tw-brightness: ; + --tw-contrast: ; + --tw-grayscale: ; + --tw-hue-rotate: ; + --tw-invert: ; + --tw-saturate: ; + --tw-sepia: ; + --tw-drop-shadow: ; + --tw-backdrop-blur: ; + --tw-backdrop-brightness: ; + --tw-backdrop-contrast: ; + --tw-backdrop-grayscale: ; + --tw-backdrop-hue-rotate: ; + --tw-backdrop-invert: ; + --tw-backdrop-opacity: ; + --tw-backdrop-saturate: ; + --tw-backdrop-sepia: ; + } + + ::backdrop { + --tw-border-spacing-x: 0; + --tw-border-spacing-y: 0; + --tw-translate-x: 0; + --tw-translate-y: 0; + --tw-rotate: 0; + --tw-skew-x: 0; + --tw-skew-y: 0; + --tw-scale-x: 1; + --tw-scale-y: 1; + --tw-pan-x: ; + --tw-pan-y: ; + --tw-pinch-zoom: ; + --tw-scroll-snap-strictness: proximity; + --tw-ordinal: ; + --tw-sl
});

0 comments on commit 9b2b5b3

Please sign in to comment.