@vivliostyle/core 2.36.4 → 2.37.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -22,14 +22,15 @@ export declare const VivliostyleViewportScreenCss = "\n@media screen {\n [data-
22
22
  /** vivliostyle-viewport.css */
23
23
  export declare const VivliostyleViewportCss = "\n[data-vivliostyle-layout-box] {\n position: absolute;\n left: 0;\n top: 0;\n right: 0;\n bottom: 0;\n overflow: hidden;\n z-index: -1;\n transform-origin: left top;\n}\n\n[data-vivliostyle-debug] [data-vivliostyle-layout-box] {\n right: auto;\n bottom: auto;\n overflow: visible;\n z-index: auto;\n}\n\n[data-vivliostyle-spread-container] {\n transform: scale(var(--viv-outputScale,1));\n transform-origin: left top;\n}\n\n/* Emulate high pixel ratio using zoom & transform:scale() */\n@supports (zoom: 8) {\n [data-vivliostyle-layout-box] {\n zoom: calc(var(--viv-outputPixelRatio,1) / var(--viv-devicePixelRatio,1));\n transform: scale(calc(var(--viv-devicePixelRatio,1) / var(--viv-outputPixelRatio,1)));\n }\n [data-vivliostyle-spread-container] {\n zoom: calc(var(--viv-outputPixelRatio,1) / var(--viv-devicePixelRatio,1));\n transform: scale(calc(var(--viv-outputScale,1) * var(--viv-devicePixelRatio,1) / var(--viv-outputPixelRatio,1)));\n }\n /* Workaround for Chromium's default border etc. widths not zoomed but scaled down */\n [data-vivliostyle-spread-container] :where([style*=border],[style*=outline],[style*=rule]) {\n border-width: medium;\n outline-width: medium;\n column-rule-width: medium;\n }\n [data-vivliostyle-spread-container] ::-webkit-scrollbar {\n width: 8px;\n height: 8px;\n }\n [data-vivliostyle-spread-container] ::-webkit-scrollbar-track {\n background-color: #f4f4f4;\n }\n [data-vivliostyle-spread-container] ::-webkit-scrollbar-thumb {\n border-radius: 4px;\n background: #c7c7c7;\n }\n [data-vivliostyle-spread-container] ::-webkit-scrollbar-thumb:hover {\n background: #7d7d7d;\n }\n}\n\n[data-vivliostyle-page-container] {\n position: relative;\n}\n\n[data-vivliostyle-bleed-box] {\n position: absolute;\n overflow: hidden;\n background-origin: content-box !important;\n}\n\n[data-vivliostyle-page-box] ~ [data-vivliostyle-page-box] {\n display: none;\n}\n\n[data-vivliostyle-toc-box] {\n position: absolute;\n left: 3px;\n top: 3px;\n overflow: scroll;\n overflow-x: hidden;\n background: rgba(248, 248, 248, 0.9);\n border-radius: 2px;\n box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.4);\n}\n\n@media print {\n [data-vivliostyle-toc-box] {\n display: none;\n }\n\n [data-vivliostyle-outer-zoom-box],\n [data-vivliostyle-spread-container] {\n width: 100% !important;\n height: 100% !important;\n }\n\n [data-vivliostyle-spread-container] {\n --viv-outputScale: 1 !important;\n --viv-devicePixelRatio: 1 !important;\n zoom: normal !important;\n transform: none !important;\n print-color-adjust: exact;\n }\n\n @supports (zoom: 8) {\n [data-vivliostyle-spread-container] [data-vivliostyle-page-container] {\n zoom: var(--viv-outputPixelRatio,1);\n /* transform: scale(calc(1 / var(--viv-outputPixelRatio,1))); */\n /* Use matrix instead of scale (Workaround for issue #1555) */\n transform: matrix(calc(1 / var(--viv-outputPixelRatio,1)), 0, 5e-324, calc(1 / var(--viv-outputPixelRatio,1)), 0, 0);\n transform-origin: left top;\n }\n }\n\n [data-vivliostyle-spread-container] [data-vivliostyle-page-container] {\n display: block !important;\n max-height: 100vh;\n }\n\n [data-vivliostyle-spread-container] [data-vivliostyle-page-container]:not(:last-child) {\n break-after: page;\n }\n\n /* Gecko-only hack, see https://bugzilla.mozilla.org/show_bug.cgi?id=267029#c17 */\n @-moz-document url-prefix() {\n [data-vivliostyle-spread-container] [data-vivliostyle-page-container]:nth-last-child(n + 2) {\n top: -1px;\n margin-top: 1px;\n margin-bottom: -1px;\n }\n /* Workaround Gecko problem on page break */\n [data-vivliostyle-spread-container] [data-vivliostyle-page-container] {\n break-after: auto !important;\n height: 100% !important;\n }\n }\n}\n";
24
24
  /** validation.txt */
25
- export declare const ValidationTxt = "\n/*\n * Copyright 2013 Google, Inc.\n * Copyright 2015 Daishinsha Inc.\n * Copyright 2019 Vivliostyle Foundation\n *\n * CSS property validation.\n */\nNUM = POS_NUM | ZERO | NEGATIVE;\nNNEG_NUM = POS_NUM | ZERO;\nINT = POS_INT | ZERO | NEGATIVE;\nNNEG_INT = POS_INT | ZERO;\nPERCENTAGE = POS_PERCENTAGE | ZERO | NEGATIVE;\nSTRICT_PERCENTAGE = POS_PERCENTAGE | ZERO_PERCENTAGE | NEGATIVE;\nNNEG_PERCENTAGE = POS_PERCENTAGE | ZERO;\nLENGTH = POS_LENGTH | ZERO | NEGATIVE;\nNNEG_LENGTH = POS_LENGTH | ZERO;\nPLENGTH = LENGTH | PERCENTAGE;\nPPLENGTH = POS_LENGTH | ZERO | POS_PERCENTAGE;\nALENGTH = LENGTH | auto;\nAPLENGTH = PLENGTH | auto;\nPAPLENGTH = PPLENGTH | auto;\nANGLE = POS_ANGLE | ZERO | NEGATIVE;\nLENGTH_OR_NUM = LENGTH | NUM;\nANGLE_OR_NUM = ANGLE | NUM;\nMIN_MAX_FIT_CONTENT = min-content | max-content | fit-content;\nBG_POSITION_TERM = PLENGTH | left | center | right | top | bottom;\nURI_OR_NONE = URI | none;\nIMAGE = URI | IMAGE_FUNCTION | none;\nbackground-attachment = COMMA( [scroll | fixed | local]+ );\nbackground-color = COLOR;\nbackground-image = COMMA( IMAGE+ );\nbackground-position = COMMA( SPACE(BG_POSITION_TERM{1,4})+ ); /* relaxed */\nbackground-repeat = COMMA( [repeat | repeat-x | repeat-y | no-repeat]+ );\nborder-collapse = collapse | separate;\nBORDER_SIDE_COLOR = COLOR;\nBORDER_SIDE_STYLE = none | hidden | dotted | dashed | solid | double | groove | ridge | inset | outset;\nBORDER_SIDE_WIDTH = thin: 1px | medium: 3px | thick: 5px | NNEG_LENGTH;\nborder-spacing = LENGTH LENGTH?;\nborder-top-color = BORDER_SIDE_COLOR;\nborder-right-color = BORDER_SIDE_COLOR;\nborder-bottom-color = BORDER_SIDE_COLOR;\nborder-left-color = BORDER_SIDE_COLOR;\nborder-top-style = BORDER_SIDE_STYLE;\nborder-right-style = BORDER_SIDE_STYLE;\nborder-bottom-style = BORDER_SIDE_STYLE;\nborder-left-style = BORDER_SIDE_STYLE;\nborder-top-width = BORDER_SIDE_WIDTH;\nborder-right-width = BORDER_SIDE_WIDTH;\nborder-bottom-width = BORDER_SIDE_WIDTH;\nborder-left-width = BORDER_SIDE_WIDTH;\nBORDER_RADIUS = PLENGTH{1,2};\nborder-top-left-radius = BORDER_RADIUS;\nborder-top-right-radius = BORDER_RADIUS;\nborder-bottom-right-radius = BORDER_RADIUS;\nborder-bottom-left-radius = BORDER_RADIUS;\nborder-image-source = IMAGE;\nborder-image-slice = [NUM | PERCENTAGE]{1,4} || fill; /* relaxed */\nborder-image-width = [NUM | PLENGTH | auto]{1,4};\nborder-image-outset = [NUM | LENGTH]{1,4};\nborder-image-repeat = [ stretch | repeat | round | space ]{1,2};\nbottom = APLENGTH;\ncaption-side = top | bottom;\nclip = rect(ALENGTH{4}) | rect(SPACE(ALENGTH{4})) | auto;\ncolor = COLOR;\nLIST_STYLE_TYPE = IDENT;\nTYPE_OR_UNIT_IN_ATTR = string | color | url | integer | number | length | angle | time | frequency;\nATTR = attr(SPACE(IDENT TYPE_OR_UNIT_IN_ATTR?) [ STRING | IDENT | COLOR | INT | NUM | PLENGTH | ANGLE | POS_TIME | FREQUENCY]?);\nCONTENT_LIST = [ STRING | URI | counter(IDENT LIST_STYLE_TYPE?) |\n counters(IDENT STRING LIST_STYLE_TYPE?) | ATTR |\n target-counter([ STRING | URI ] IDENT LIST_STYLE_TYPE?) |\n target-counter(ATTR IDENT LIST_STYLE_TYPE?) |\n target-counters([ STRING | URI ] IDENT STRING LIST_STYLE_TYPE?) |\n target-counters(ATTR IDENT STRING LIST_STYLE_TYPE?) |\n target-text([ STRING | URI ] [content | before | after | first-letter]?) |\n target-text(ATTR [content | before | after | first-letter]?) |\n leader([ dotted | solid | space ] | STRING ) |\n open-quote | close-quote | no-open-quote | no-close-quote |\n content([ text | before | after | first-letter ]?) |\n string(IDENT [first | start | last | first-except]?) |\n element(IDENT [first | start | last | first-except]?) ]+;\nCONTENT = normal | none | CONTENT_LIST;\ncontent = CONTENT;\nCOUNTER = [ IDENT INT? ]+ | none;\ncounter-increment = COUNTER;\ncounter-reset = COUNTER;\ncounter-set = COUNTER;\ncursor = COMMA(URI* [ auto | crosshair | default | pointer | move | e-resize | ne-resize | nw-resize |\n n-resize | se-resize | sw-resize | s-resize | w-resize | text | wait | help | progress ]);\ndirection = ltr | rtl;\ndisplay = inline | block | list-item | inline-block | table | inline-table | table-row-group |\n table-header-group | table-footer-group | table-row | table-column-group | table-column |\n table-cell | table-caption | none | oeb-page-head | oeb-page-foot | flex | inline-flex |\n ruby | ruby-base | ruby-text | ruby-base-container | ruby-text-container | run-in | compact | marker |\n flow-root | grid | inline-grid | contents;\nempty-cells = show | hide;\nFAMILY = SPACE(IDENT+) | STRING;\nFAMILY_LIST = COMMA( FAMILY+ );\nfont-family = FAMILY_LIST;\nfont-size = xx-small | x-small | small | medium | large | x-large | xx-large | larger | smaller | PPLENGTH;\nfont-style = normal | italic | oblique;\nfont-weight = normal | bold | bolder | lighter | POS_NUM;\nheight = PAPLENGTH | MIN_MAX_FIT_CONTENT;\nleft = APLENGTH;\nletter-spacing = normal | LENGTH_OR_NUM;\nline-height = normal | POS_NUM | PPLENGTH;\nlist-style-image = IMAGE;\nlist-style-position = inside | outside;\nlist-style-type = LIST_STYLE_TYPE;\nmargin-right = APLENGTH;\nmargin-left = APLENGTH;\nmargin-top = APLENGTH;\nmargin-bottom = APLENGTH;\nNPLENGTH = none | PLENGTH;\nmax-height = NPLENGTH | MIN_MAX_FIT_CONTENT;\nmax-width = NPLENGTH | MIN_MAX_FIT_CONTENT;\nmin-height = APLENGTH | MIN_MAX_FIT_CONTENT;\nmin-width = APLENGTH | MIN_MAX_FIT_CONTENT;\norphans = POS_INT;\noutline-offset = LENGTH;\noutline-color = COLOR | invert;\noutline-style = BORDER_SIDE_STYLE;\noutline-width = BORDER_SIDE_WIDTH;\noverflow = visible | hidden | scroll | auto | clip;\npadding-right = PPLENGTH;\npadding-left = PPLENGTH;\npadding-top = PPLENGTH;\npadding-bottom = PPLENGTH;\nPAGE_BREAK = auto | always | avoid | left | right | recto | verso;\npage-break-after = PAGE_BREAK;\npage-break-before = PAGE_BREAK;\npage-break-inside = avoid | auto;\nposition = static | relative | absolute | fixed | running(IDENT);\nquotes = [STRING STRING]+ | none | auto;\nright = APLENGTH;\ntable-layout = auto | fixed;\ntext-align = left | right | center | justify | start | end | match-parent | inside | outside;\ntext-indent = PLENGTH;\ntext-transform = capitalize | uppercase | lowercase | none;\ntop = APLENGTH;\nvertical-align = baseline | sub | super | top | text-top | middle | bottom | text-bottom | PLENGTH;\nvisibility = visible | hidden | collapse;\nwhite-space = normal | pre | nowrap | pre-wrap | pre-line | break-spaces;\nwidows = POS_INT;\nwidth = PAPLENGTH | MIN_MAX_FIT_CONTENT;\nword-spacing = normal | LENGTH_OR_NUM;\nz-index = auto | INT;\n\n[epub,moz,webkit]hyphens = auto | manual | none;\n[webkit]hyphenate-character = auto | STRING;\n\n/* css-logical */\nmargin-block-start = APLENGTH;\nmargin-block-end = APLENGTH;\nmargin-inline-start = APLENGTH;\nmargin-inline-end = APLENGTH;\npadding-block-start = APLENGTH;\npadding-block-end = APLENGTH;\npadding-inline-start = APLENGTH;\npadding-inline-end = APLENGTH;\nborder-block-start-color = BORDER_SIDE_COLOR;\nborder-block-end-color = BORDER_SIDE_COLOR;\nborder-inline-start-color = BORDER_SIDE_COLOR;\nborder-inline-end-color = BORDER_SIDE_COLOR;\nborder-block-start-style = BORDER_SIDE_STYLE;\nborder-block-end-style = BORDER_SIDE_STYLE;\nborder-inline-start-style = BORDER_SIDE_STYLE;\nborder-inline-end-style = BORDER_SIDE_STYLE;\nborder-block-start-width = BORDER_SIDE_WIDTH;\nborder-block-end-width = BORDER_SIDE_WIDTH;\nborder-inline-start-width = BORDER_SIDE_WIDTH;\nborder-inline-end-width = BORDER_SIDE_WIDTH;\nblock-start = APLENGTH;\nblock-end = APLENGTH;\ninline-start = APLENGTH;\ninline-end = APLENGTH;\nblock-size = PAPLENGTH | MIN_MAX_FIT_CONTENT;\ninline-size = PAPLENGTH | MIN_MAX_FIT_CONTENT;\nmax-block-size = NPLENGTH | MIN_MAX_FIT_CONTENT;\nmax-inline-size = NPLENGTH | MIN_MAX_FIT_CONTENT;\nmin-block-size = APLENGTH | MIN_MAX_FIT_CONTENT;\nmin-inline-size = APLENGTH | MIN_MAX_FIT_CONTENT;\n\nmargin-inside = auto | APLENGTH;\nmargin-outside = auto | APLENGTH;\npadding-inside = PPLENGTH;\npadding-outside = PPLENGTH;\nborder-inside-color = BORDER_SIDE_COLOR;\nborder-outside-color = BORDER_SIDE_COLOR;\nborder-inside-style = BORDER_SIDE_STYLE;\nborder-outside-style = BORDER_SIDE_STYLE;\nborder-inside-width = BORDER_SIDE_WIDTH;\nborder-outside-width = BORDER_SIDE_WIDTH;\ninside = APLENGTH;\noutside = APLENGTH;\n\nSHAPE = auto | rectangle( PLENGTH{4} ) | ellipse( PLENGTH{4} ) | circle( PLENGTH{3} ) |\n polygon( SPACE(PLENGTH+)+ );\n[epubx]shape-inside = SHAPE;\n[epubx,webkit]shape-outside = SHAPE;\n[epubx]wrap-flow = auto | both | start | end | maximum | clear | around /* epub al */;\n\nTRANSFORM_FUNCTION = matrix(NUM{6}) | translate(PLENGTH{1,2}) | translateX(PLENGTH) | translateY(PLENGTH) |\n scale(NUM{1,2}) | scaleX(NUM) | scaleY(NUM) | rotate(ANGLE) | skewX(ANGLE) | skewY(ANGLE);\n[epub]transform = none | TRANSFORM_FUNCTION+;\n[epub]transform-origin = [[[ top | bottom | left | right] PLENGTH?] | center | PLENGTH]{1,2}; /* relaxed */\n\nBOX = border-box | padding-box | content-box;\nSHADOW = SPACE(inset || LENGTH{2,4} || COLOR); /* relaxed */\n[webkit]background-size = COMMA( SPACE( [PLENGTH | auto ]{1,2} | cover | contain)+ );\n[webkit]background-origin = COMMA( BOX+ );\n[webkit]background-clip = COMMA( BOX+ );\n[webkit]box-shadow = none | COMMA( SHADOW+ );\ntext-shadow = none | COMMA( SHADOW+ );\n[webkit]box-decoration-break = slice | clone;\nFILTER_FUNCTION = blur(LENGTH) | brightness(NUM | PERCENTAGE) | contrast(NUM | PERCENTAGE) | drop-shadow(SPACE(LENGTH{2,3} COLOR?))\n | grayscale(NUM | PERCENTAGE) | hue-rotate(ANGLE) | invert(NUM | PERCENTAGE) | opacity(NUM | PERCENTAGE)\n | saturate(NUM | PERCENTAGE) | sepia(NUM | PERCENTAGE);\nFILTER_FUNCTION_LIST = FILTER_FUNCTION+;\n[webkit]filter = none | FILTER_FUNCTION_LIST;\n\nopacity = NUM;\n\n[moz,webkit]column-width = LENGTH | auto;\n[moz,webkit]column-count = INT | auto;\n[moz,webkit]column-gap = LENGTH | normal;\n[moz,webkit]column-rule-color = COLOR;\n[moz,webkit]column-rule-style = BORDER_SIDE_STYLE;\n[moz,webkit]column-rule-width = BORDER_SIDE_WIDTH;\nBREAK = auto | avoid | avoid-page | page | left | right | recto | verso | avoid-column | column | avoid-region | region;\nbreak-before = BREAK;\nbreak-after = BREAK;\nbreak-inside = auto | avoid | avoid-page | avoid-column | avoid-region;\n[webkit]column-span = none | auto | all;\n[moz]column-fill = auto | balance | balance-all;\nmargin-break = auto | keep | discard;\n\nsrc = COMMA([SPACE(URI format(STRING+)?) | local(FAMILY)]+); /* for font-face */\n\n[epubx,webkit]flow-from = IDENT;\n[epubx,webkit]flow-into = IDENT;\n[epubx]flow-linger = INT | none;\n[epubx]flow-priority = INT;\n[epubx]flow-options = none | [ exclusive || last || static ];\n[epubx]page = INT | auto | IDENT; /* page: IDENT is for CSS Paged Media */\n[epubx]min-page-width = LENGTH;\n[epubx]min-page-height = LENGTH;\n[epubx]required = true | false;\n[epubx]enabled = true | false;\n[epubx]conflicting-partitions = COMMA(IDENT+);\n[epubx]required-partitions = COMMA(IDENT+);\n[epubx]snap-height = LENGTH | none;\n[epubx]snap-width = LENGTH | none;\n[epubx]flow-consume = all | some;\n[epubx]utilization = NUM;\n[epubx]text-zoom = font-size | scale;\n\n[adapt]template = URI_OR_NONE | footnote;\n[adapt]behavior = IDENT;\n\n/* CSS Fonts */\nCOMMON_LIG_VALUES = [ common-ligatures | no-common-ligatures ];\nDISCRETIONARY_LIG_VALUES = [ discretionary-ligatures | no-discretionary-ligatures ];\nHISTORICAL_LIG_VALUES = [ historical-ligatures | no-historical-ligatures ];\nCONTEXTUAL_ALT_VALUES = [ contextual | no-contextual ];\nfont-variant-ligatures = normal | none | [ COMMON_LIG_VALUES || DISCRETIONARY_LIG_VALUES || HISTORICAL_LIG_VALUES || CONTEXTUAL_ALT_VALUES ];\nfont-variant-caps = normal | small-caps | all-small-caps | petite-caps | all-petite-caps | unicase | titling-caps;\nNUMERIC_FIGURE_VALUES = [ lining-nums | oldstyle-nums ];\nNUMERIC_SPACING_VALUES = [ proportional-nums | tabular-nums ];\nNUMERIC_FRACTION_VALUES = [ diagonal-fractions | stacked-fractions ];\nfont-variant-numeric = normal | [ NUMERIC_FIGURE_VALUES || NUMERIC_SPACING_VALUES || NUMERIC_FRACTION_VALUES || ordinal || slashed-zero ];\nEAST_ASIAN_VARIANT_VALUES = [ jis78 | jis83 | jis90 | jis04 | simplified | traditional ];\nEAST_ASIAN_WIDTH_VALUES = [ full-width | proportional-width ];\nfont-variant-east-asian = normal | [ EAST_ASIAN_VARIANT_VALUES || EAST_ASIAN_WIDTH_VALUES || ruby ];\nfont-variant_css2 = normal | small-caps; /* for font shorthand */\nfont-size-adjust = none | NNEG_NUM;\n[webkit]font-kerning = auto | normal | none;\nfont-feature-settings = COMMA( normal | SPACE( STRING [ on | off | INT ]? )+ );\nFONT_STRETCH_CSS3_VALUES = normal | wider | narrower | ultra-condensed | extra-condensed | condensed | semi-condensed | semi-expanded | expanded | extra-expanded | ultra-expanded;\nfont-stretch = FONT_STRETCH_CSS3_VALUES | PERCENTAGE;\nfont-stretch_css3 = FONT_STRETCH_CSS3_VALUES; /* for font shorthand */\nfont-display = [ auto | block | swap | fallback | optional ];\nunicode-range = COMMA( URANGE+ );\n\n/* CSS Images */\nimage-resolution = RESOLUTION;\nobject-fit = fill | contain | cover | none | scale-down;\nobject-position = COMMA( SPACE(BG_POSITION_TERM{1,4})+ ); /* relaxed */\n\n/* CSS Paged Media */\nPAGE_SIZE = a10 | a9 | a8 | a7 | a6 | a5 | a4 | a3 | a2 | a1 | a0\n | b10 | b9 | b8 | b7 | b6 | b5 | b4 | b3 | b2 | b1 | b0\n | c10 | c9 | c8 | c7 | c6 | c5 | c4 | c3 | c2 | c1 | c0\n | jis-b10 | jis-b9 | jis-b8 | jis-b7 | jis-b6 | jis-b5 | jis-b4 | jis-b3 | jis-b2 | jis-b1 | jis-b0\n | letter | legal | ledger;\nbleed = auto | LENGTH;\nmarks = none | [ crop || cross ];\nsize = POS_LENGTH{1,2} | auto | [ PAGE_SIZE || [ portrait | landscape ] ];\ncrop-offset = auto | LENGTH;\ncrop-marks-line-color = auto | COLOR;\n\n/* CSS Page Floats */\nclear = none | left | right | top | bottom | inline-start | inline-end | block-start | block-end | inside | outside | both | all | same | column | region | page;\nfloat-reference = inline | column | region | page;\nfloat = none | footnote | [ block-start || block-end || inline-start || inline-end || snap-block || snap-inline || left || right || top || bottom || inside || outside ];\nfloat-min-wrap-block = PPLENGTH;\n\n/* CSS Ruby */\nruby-align = start | center | space-between | space-around;\nruby-position = over | under | inter-character;\n\n/* CSS Size Adjust */\n[moz,webkit]text-size-adjust = auto | none | POS_PERCENTAGE;\n\n/* CSS Text */\n[webkit]line-break = auto | loose | normal | strict | anywhere;\noverflow-wrap = normal | break-word | anywhere;\n[moz]tab-size = NNEG_INT | NNEG_LENGTH;\n[moz]text-align-last = auto | start | end | left | right | center | justify | inside | outside;\ntext-justify = auto | none | inter-word | inter-character;\nword-break = normal | keep-all | break-all | break-word;\ntext-spacing-trim = auto | normal | space-all | trim-both | trim-auto |\n [[ trim-start | space-start | space-first ] ||\n [ trim-end | space-end | allow-end ] ||\n [ trim-adjacent | space-adjacent ]];\ntext-autospace = normal | auto | no-autospace |\n [[ ideograph-alpha || ideograph-numeric || punctuation ] || [ insert | replace ]];\nhanging-punctuation = none | [ first || [ force-end | allow-end ] || last ];\n\n/* CSS Text Decoration */\n[webkit]text-decoration-color = COLOR;\n[webkit]text-decoration-line = none | [ underline || overline || line-through || blink ];\n[webkit]text-decoration-skip = none | [ objects || spaces || ink || edges || box-decoration ];\n[webkit]text-decoration-style = solid | double | dotted | dashed | wavy;\n[webkit]text-decoration-thickness = from-font | APLENGTH;\n[epub,webkit]text-emphasis-color = COLOR;\n[webkit]text-emphasis-position = [ over | under ] [ right | left ];\n[epub,webkit]text-emphasis-style = none | [[ filled | open ] || [ dot | circle | double-circle | triangle | sesame ]] | STRING;\n[webkit]text-underline-position = auto | [ under || [ left | right ]];\n\n/* CSS Transforms */\n[webkit]backface-visibility = visible | hidden;\n\n/* CSS UI */\n[moz,webkit]box-sizing = content-box | padding-box | border-box;\ntext-overflow = [clip | ellipsis | STRING]{1,2};\n\n/* CSS Writing Modes */\n[epub,webkit]text-combine = none | horizontal;\ntext-combine-upright = none | all; /* relaxed */\n[epub,webkit]text-orientation = mixed | upright | sideways-right | sideways-left | sideways | use-glyph-orientation /* the following values are kept for backward-compatibility */ | vertical-right | rotate-right | rotate-left | rotate-normal | auto;\nunicode-bidi = normal | embed | isolate | bidi-override | isolate-override | plaintext;\n[epub,webkit]writing-mode = horizontal-tb | vertical-rl | lr-tb | rl-tb | tb-rl | lr | rl | tb;\n\n/* CSS Flex box */\nFLEX_BASIS = content | PAPLENGTH;\nflex-direction = row | row-reverse | column | column-reverse;\nflex-wrap = nowrap | wrap | wrap-reverse;\norder = INT;\nflex-grow = NNEG_NUM;\nflex-shrink = NNEG_NUM;\nflex-basis = FLEX_BASIS;\nflex = none | [ [ NNEG_NUM NNEG_NUM? ] || FLEX_BASIS ];\njustify-content = flex-start | flex-end | center | space-between | space-around;\nalign-items = flex-start | flex-end | center | baseline | stretch;\nalign-self = auto | flex-start | flex-end | center | baseline | stretch;\nalign-content = flex-start | flex-end | center | space-between | space-around | stretch;\n\n/* Pointer Events */\ntouch-action = auto | none | [ pan-x || pan-y ] | manipulation;\n\n/* SVG 2 */\nOPACITY_VALUE = NUM | PERCENTAGE;\nDASH_ARRAY = COMMA( SPACE( [ LENGTH | PERCENTAGE | NUM ]+ )+ );\nPAINT = none | child | child(INT) | COLOR | SPACE( URI [none | COLOR]? ) | context-fill | context-stroke;\ncolor-interpolation = auto | sRGB | linearRGB;\ncolor-rendering = auto | optimizeSpeed | optimizeQuality;\nfill = PAINT;\nfill-opacity = OPACITY_VALUE;\nfill-rule = nonzero | evenodd;\nglyph-orientation-vertical = auto | NUM | ANGLE;\nimage-rendering = auto | optimizeSpeed | optimizeQuality | crisp-edges | pixelated;\nmarker-start = none | URI;\nmarker-mid = none | URI;\nmarker-end = none | URI;\npointer-events = bounding-box | visiblePainted | visibleFill | visibleStroke | visible | painted | fill | stroke | all | none;\npaint-order = normal | [ fill || stroke || markers ];\nshape-rendering = auto | optimizeSpeed | crispEdges | geometricPrecision;\nstop-color = COLOR;\nstop-opacity = OPACITY_VALUE;\nstroke = PAINT;\nstroke-dasharray = none | DASH_ARRAY;\nstroke-dashoffset = PERCENTAGE | LENGTH_OR_NUM;\nstroke-linecap = butt | round | square;\nstroke-linejoin = miter | round | bevel;\nstroke-miterlimit = NUM;\nstroke-opacity = OPACITY_VALUE;\nstroke-width = PERCENTAGE | LENGTH_OR_NUM;\ntext-anchor = start | middle | end;\ntext-rendering = auto | optimizeSpeed | optimizeLegibility | geometricPrecision;\nvector-effect = none | SPACE( [ non-scaling-stroke | non-scaling-size | non-rotation | fixed-position ]+ [ viewport | screen ]? );\n\n/* SVG 1.1 */\nalignment-baseline = auto | baseline | before-edge | text-before-edge | middle | central | after-edge | text-after-edge | ideographic | alphabetic | hanging | mathematical;\nbaseline-shift = baseline | sub | super | PERCENTAGE | LENGTH_OR_NUM;\ndominant-baseline = auto | use-script | no-change | reset-size | ideographic | alphabetic | hanging | mathematical | central | middle | text-after-edge | text-before-edge;\nmask = none | URI;\n\n/* css-masking-1 */\nSHAPE_RADIUS = PLENGTH | closest-side | farthest-side;\nFILL_RULE = nonzero | evenodd;\nSHAPE_BOX = BOX | margin-box;\nGEOMETRY_BOX = SHAPE_BOX | fill-box | stroke-box | view-box;\nBASIC_SHAPE =\n inset( SPACE( PLENGTH{1,4} [ round PLENGTH{1,4} [ SLASH PLENGTH{1,4} ]? ]? ) )\n | circle( SPACE( [SHAPE_RADIUS]? [at BG_POSITION_TERM{1,4}]? ) )\n | ellipse( SPACE( SHAPE_RADIUS{2}? [at BG_POSITION_TERM{1,4}]? ) )\n | polygon( FILL_RULE? COMMA( SPACE( PLENGTH{2} )+ )+ );\n[webkit]clip-path = none | URI | [ BASIC_SHAPE || GEOMETRY_BOX ];\nclip-rule = nonzero | evenodd;\n\n/* filters */\nflood-color = COLOR;\nflood-opacity = OPACITY_VALUE;\nlighting-color = COLOR;\n\n/* compositing-1 */\nBLEND_MODE = normal | multiply | screen | overlay | darken | lighten | color-dodge | color-burn | hard-light | soft-light | difference | exclusion | hue | saturation | color | luminosity;\nmix-blend-mode = BLEND_MODE;\nisolation = auto | isolate;\nbackground-blend-mode = COMMA( BLEND_MODE+ );\n\n/* CSS GCPM */\nstring-set = COMMA( SPACE( IDENT CONTENT_LIST )+ | none );\nfootnote-policy = auto | line;\n\n/* CSS Repeated Headers and Footers */\n[viv]repeat-on-break = auto | none | header | footer;\n\n/* Compatibility */\n[webkit]text-fill-color = COLOR;\n[webkit]text-stroke-color = COLOR;\n[webkit]text-stroke-width = BORDER_SIDE_WIDTH;\n\nDEFAULTS\n\nbackground-attachment: scroll;\nbackground-color: transparent;\nbackground-image: none;\nbackground-repeat: repeat;\nbackground-position: 0% 0%;\nbackground-clip: border-box;\nbackground-origin: padding-box;\nbackground-size: auto;\nborder-top-color: currentColor;\nborder-right-color: currentColor;\nborder-bottom-color: currentColor;\nborder-left-color: currentColor;\nborder-top-style: none;\nborder-right-style: none;\nborder-bottom-style: none;\nborder-left-style: none;\nborder-top-width: 3px;\nborder-right-width: 3px;\nborder-bottom-width: 3px;\nborder-left-width: 3px;\nborder-top-left-radius: 0;\nborder-top-right-radius: 0;\nborder-bottom-right-radius: 0;\nborder-bottom-left-radius: 0;\nborder-image-source: none;\nborder-image-slice: 100%;\nborder-image-width: 1;\nborder-image-outset: 0;\nborder-image-repeat: stretch;\ncolumn-count: auto;\ncolumn-gap: normal;\ncolumn-width: auto;\ncolumn-rule-color: currentColor;\ncolumn-rule-style: none;\ncolumn-rule-width: 3px;\ncolumn-fill: balance;\noutline-color: currentColor;\noutline-style: none;\noutline-width: 3px;\nflex-direction: row;\nflex-wrap: nowrap;\nfont-family: serif;\nfont-style: normal;\nfont-size: medium;\nfont-size-adjust: none;\nfont-kerning: auto;\nfont-feature-settings: normal;\nfont-variant-ligatures: normal;\nfont-variant-caps: normal;\nfont-variant-numeric: normal;\nfont-variant-east-asian: normal;\nfont-weight: normal;\nfont-stretch: normal;\nline-height: normal;\nlist-style-image: none;\nlist-style-position: outside;\nlist-style-type: disc;\nmargin-bottom: auto;\nmargin-left: auto;\nmargin-right: auto;\nmargin-top: auto;\npadding-bottom: auto;\npadding-left: auto;\npadding-right: auto;\npadding-top: auto;\ntext-autospace: normal;\ntext-emphasis-color: currentColor;\ntext-emphasis-style: none;\ntext-spacing-trim: normal;\ntext-stroke-color: currentColor;\ntext-stroke-width: 0;\nmarker-start: none;\nmarker-mid: none;\nmarker-end: none;\n\n/* css-logical */\nborder-block-start-color: currentColor;\nborder-block-end-color: currentColor;\nborder-inline-start-color: currentColor;\nborder-inline-end-color: currentColor;\nborder-inside-color: currentColor;\nborder-outside-color: currentColor;\nborder-block-start-style: none;\nborder-block-end-style: none;\nborder-inline-start-style: none;\nborder-inline-end-style: none;\nborder-inside-style: none;\nborder-outside-style: none;\nborder-block-start-width: 3px;\nborder-block-end-width: 3px;\nborder-inline-start-width: 3px;\nborder-inline-end-width: 3px;\nborder-inside-width: 3px;\nborder-outside-width: 3px;\n\nSHORTHANDS\n\nall = ALL;\nbackground = COMMA background-image [background-position [ / background-size ]] background-repeat\n background-attachment [background-origin background-clip] background-color; /* background-color is a special case, see the code */\nborder-top = border-top-width border-top-style border-top-color;\nborder-right = border-right-width border-right-style border-right-color;\nborder-bottom = border-bottom-width border-bottom-style border-bottom-color;\nborder-left = border-left-width border-left-style border-left-color;\nborder-inside = border-inside-width border-inside-style border-inside-color;\nborder-outside = border-outside-width border-outside-style border-outside-color;\nborder-width = INSETS border-top-width border-right-width border-bottom-width border-left-width;\nborder-style = INSETS border-top-style border-right-style border-bottom-style border-left-style;\nborder-color = INSETS border-top-color border-right-color border-bottom-color border-left-color;\nborder = border-width border-style border-color;\nborder-image = border-image-source border-image-slice [ / border-image-width [ / border-image-outset ] ]\n border-image-repeat;\nborder-radius = INSETS_SLASH border-top-left-radius border-top-right-radius\n border-bottom-right-radius border-bottom-left-radius;\n[moz,webkit]columns = column-width column-count;\n[moz,webkit]column-rule = column-rule-width column-rule-style column-rule-color;\nflex-flow = flex-direction flex-wrap;\noeb-column-number = column-count;\noutline = outline-width outline-style outline-color;\nlist-style = list-style-position list-style-type list-style-image;\nmargin = INSETS margin-top margin-right margin-bottom margin-left;\npadding = INSETS padding-top padding-right padding-bottom padding-left;\nfont = FONT font-style font-variant_css2 font-weight font-stretch_css3 /* font-size line-height font-family are special-cased */;\nfont-variant = font-variant-ligatures font-variant-caps font-variant-numeric font-variant-east-asian;\n[epub,webkit]text-emphasis = text-emphasis-style text-emphasis-color;\nmarker = INSETS marker-start marker-mid marker-end;\n[webkit]text-stroke = text-stroke-width text-stroke-color;\ntext-decoration = text-decoration-line text-decoration-color text-decoration-style text-decoration-thickness;\ntext-spacing = TEXT_SPACING text-autospace text-spacing-trim;\n\n/* css-logical */\nmargin-block = INSETS margin-block-start margin-block-end;\nmargin-inline = INSETS margin-inline-start margin-inline-end;\npadding-block = INSETS padding-block-start padding-block-end;\npadding-inline = INSETS padding-inline-start padding-inline-end;\nborder-block-width = INSETS border-block-start-width border-block-end-width;\nborder-block-style = INSETS border-block-start-style border-block-end-style;\nborder-block-color = INSETS border-block-start-color border-block-end-color;\nborder-inline-width = INSETS border-inline-start-width border-inline-end-width;\nborder-inline-style = INSETS border-inline-start-style border-inline-end-style;\nborder-inline-color = INSETS border-inline-start-color border-inline-end-color;\nborder-block = border-block-width border-block-style border-block-color;\nborder-inline = border-inline-width border-inline-style border-inline-color;\nborder-block-start = border-block-start-width border-block-start-style border-block-start-color;\nborder-block-end = border-block-end-width border-block-end-style border-block-end-color;\nborder-inline-start = border-inline-start-width border-inline-start-style border-inline-start-color;\nborder-inline-end = border-inline-end-width border-inline-end-style border-inline-end-color;\ninset-block-start = block-start;\ninset-block-end = block-end;\ninset-inline-start = inline-start;\ninset-inline-end = inline-end;\ninset-inside = inside;\ninset-outside = outside;\ninset-block = INSETS block-start block-end;\ninset-inline = INSETS inline-start inline-end;\ninset = INSETS top right bottom left;\n\n/* old names */\nword-wrap = overflow-wrap;\n[adapt,webkit]margin-before = margin-block-start;\n[adapt,webkit]margin-after = margin-block-end;\n[adapt,webkit]margin-start = margin-inline-start;\n[adapt,webkit]margin-end = margin-inline-end;\n[adapt,webkit]padding-before = padding-block-start;\n[adapt,webkit]padding-after = padding-block-end;\n[adapt,webkit]padding-start = padding-inline-start;\n[adapt,webkit]padding-end = padding-inline-end;\n[adapt,webkit]border-before-color = border-block-start-color;\n[adapt,webkit]border-after-color = border-block-end-color;\n[adapt,webkit]border-start-color = border-inline-start-color;\n[adapt,webkit]border-end-color = border-inline-end-color;\n[adapt,webkit]border-before-style = border-block-start-style;\n[adapt,webkit]border-after-style = border-block-end-style;\n[adapt,webkit]border-start-style = border-inline-start-style;\n[adapt,webkit]border-end-style = border-inline-end-style;\n[adapt,webkit]border-before-width = border-block-start-width;\n[adapt,webkit]border-after-width = border-block-end-width;\n[adapt,webkit]border-start-width = border-inline-start-width;\n[adapt,webkit]border-end-width = border-inline-end-width;\n[adapt,webkit]before = block-start;\n[adapt,webkit]after = block-end;\n[adapt,webkit]start = inline-start;\n[adapt,webkit]end = inline-end;\n\n";
25
+ export declare const ValidationTxt = "\n/*\n * Copyright 2013 Google, Inc.\n * Copyright 2015 Daishinsha Inc.\n * Copyright 2019 Vivliostyle Foundation\n *\n * CSS property validation.\n */\nNUM = POS_NUM | ZERO | NEGATIVE;\nNNEG_NUM = POS_NUM | ZERO;\nINT = POS_INT | ZERO | NEGATIVE;\nNNEG_INT = POS_INT | ZERO;\nPERCENTAGE = POS_PERCENTAGE | ZERO | NEGATIVE;\nSTRICT_PERCENTAGE = POS_PERCENTAGE | ZERO_PERCENTAGE | NEGATIVE;\nNNEG_PERCENTAGE = POS_PERCENTAGE | ZERO;\nLENGTH = POS_LENGTH | ZERO | NEGATIVE;\nNNEG_LENGTH = POS_LENGTH | ZERO;\nPLENGTH = LENGTH | PERCENTAGE;\nPPLENGTH = POS_LENGTH | ZERO | POS_PERCENTAGE;\nALENGTH = LENGTH | auto;\nAPLENGTH = PLENGTH | auto;\nPAPLENGTH = PPLENGTH | auto;\nANGLE = POS_ANGLE | ZERO | NEGATIVE;\nLENGTH_OR_NUM = LENGTH | NUM;\nANGLE_OR_NUM = ANGLE | NUM;\nMIN_MAX_FIT_CONTENT = min-content | max-content | fit-content;\nBG_POSITION_TERM = PLENGTH | left | center | right | top | bottom;\nURI_OR_NONE = URI | none;\nIMAGE = URI | IMAGE_FUNCTION | none;\nbackground-attachment = COMMA( [scroll | fixed | local]+ );\nbackground-color = COLOR;\nbackground-image = COMMA( IMAGE+ );\nbackground-position = COMMA( SPACE(BG_POSITION_TERM{1,4})+ ); /* relaxed */\nbackground-repeat = COMMA( [repeat | repeat-x | repeat-y | no-repeat]+ );\nborder-collapse = collapse | separate;\nBORDER_SIDE_COLOR = COLOR;\nBORDER_SIDE_STYLE = none | hidden | dotted | dashed | solid | double | groove | ridge | inset | outset;\nBORDER_SIDE_WIDTH = thin: 1px | medium: 3px | thick: 5px | NNEG_LENGTH;\nborder-spacing = LENGTH LENGTH?;\nborder-top-color = BORDER_SIDE_COLOR;\nborder-right-color = BORDER_SIDE_COLOR;\nborder-bottom-color = BORDER_SIDE_COLOR;\nborder-left-color = BORDER_SIDE_COLOR;\nborder-top-style = BORDER_SIDE_STYLE;\nborder-right-style = BORDER_SIDE_STYLE;\nborder-bottom-style = BORDER_SIDE_STYLE;\nborder-left-style = BORDER_SIDE_STYLE;\nborder-top-width = BORDER_SIDE_WIDTH;\nborder-right-width = BORDER_SIDE_WIDTH;\nborder-bottom-width = BORDER_SIDE_WIDTH;\nborder-left-width = BORDER_SIDE_WIDTH;\nBORDER_RADIUS = PLENGTH{1,2};\nborder-top-left-radius = BORDER_RADIUS;\nborder-top-right-radius = BORDER_RADIUS;\nborder-bottom-right-radius = BORDER_RADIUS;\nborder-bottom-left-radius = BORDER_RADIUS;\nborder-image-source = IMAGE;\nborder-image-slice = [NUM | PERCENTAGE]{1,4} || fill; /* relaxed */\nborder-image-width = [NUM | PLENGTH | auto]{1,4};\nborder-image-outset = [NUM | LENGTH]{1,4};\nborder-image-repeat = [ stretch | repeat | round | space ]{1,2};\nbottom = APLENGTH;\ncaption-side = top | bottom;\nclip = rect(ALENGTH{4}) | rect(SPACE(ALENGTH{4})) | auto;\ncolor = COLOR;\nLIST_STYLE_TYPE = IDENT;\nTYPE_OR_UNIT_IN_ATTR = string | color | url | integer | number | length | angle | time | frequency;\nATTR = attr(SPACE(IDENT TYPE_OR_UNIT_IN_ATTR?) [ STRING | IDENT | COLOR | INT | NUM | PLENGTH | ANGLE | POS_TIME | FREQUENCY]?);\nCONTENT_LIST = [ STRING | URI | counter(IDENT LIST_STYLE_TYPE?) |\n counters(IDENT STRING LIST_STYLE_TYPE?) | ATTR |\n target-counter([ STRING | URI ] IDENT LIST_STYLE_TYPE?) |\n target-counter(ATTR IDENT LIST_STYLE_TYPE?) |\n target-counters([ STRING | URI ] IDENT STRING LIST_STYLE_TYPE?) |\n target-counters(ATTR IDENT STRING LIST_STYLE_TYPE?) |\n target-text([ STRING | URI ] [content | before | after | first-letter | marker]?) |\n target-text(ATTR [content | before | after | first-letter | marker]?) |\n leader([ dotted | solid | space ] | STRING ) |\n open-quote | close-quote | no-open-quote | no-close-quote |\n content([ text | before | after | first-letter | marker ]?) |\n string(IDENT [first | start | last | first-except]?) |\n element(IDENT [first | start | last | first-except]?) ]+;\nCONTENT = normal | none | CONTENT_LIST;\ncontent = CONTENT;\nCOUNTER = [ IDENT INT? ]+ | none;\ncounter-increment = COUNTER;\ncounter-reset = COUNTER;\ncounter-set = COUNTER;\ncursor = COMMA(URI* [ auto | crosshair | default | pointer | move | e-resize | ne-resize | nw-resize |\n n-resize | se-resize | sw-resize | s-resize | w-resize | text | wait | help | progress ]);\ndirection = ltr | rtl;\ndisplay = inline | block | list-item | inline-block | table | inline-table | table-row-group |\n table-header-group | table-footer-group | table-row | table-column-group | table-column |\n table-cell | table-caption | none | oeb-page-head | oeb-page-foot | flex | inline-flex |\n ruby | ruby-base | ruby-text | ruby-base-container | ruby-text-container | run-in | compact | marker |\n flow-root | grid | inline-grid | contents;\nempty-cells = show | hide;\nFAMILY = SPACE(IDENT+) | STRING;\nFAMILY_LIST = COMMA( FAMILY+ );\nfont-family = FAMILY_LIST;\nfont-size = xx-small | x-small | small | medium | large | x-large | xx-large | larger | smaller | PPLENGTH;\nfont-style = normal | italic | oblique;\nfont-weight = normal | bold | bolder | lighter | POS_NUM;\nheight = PAPLENGTH | MIN_MAX_FIT_CONTENT;\nleft = APLENGTH;\nletter-spacing = normal | LENGTH_OR_NUM;\nline-height = normal | POS_NUM | PPLENGTH;\nlist-style-image = IMAGE;\nlist-style-position = inside | outside;\nlist-style-type = LIST_STYLE_TYPE | STRING | none;\nmargin-right = APLENGTH;\nmargin-left = APLENGTH;\nmargin-top = APLENGTH;\nmargin-bottom = APLENGTH;\nNPLENGTH = none | PLENGTH;\nmax-height = NPLENGTH | MIN_MAX_FIT_CONTENT;\nmax-width = NPLENGTH | MIN_MAX_FIT_CONTENT;\nmin-height = APLENGTH | MIN_MAX_FIT_CONTENT;\nmin-width = APLENGTH | MIN_MAX_FIT_CONTENT;\norphans = POS_INT;\noutline-offset = LENGTH;\noutline-color = COLOR | invert;\noutline-style = BORDER_SIDE_STYLE;\noutline-width = BORDER_SIDE_WIDTH;\noverflow = visible | hidden | scroll | auto | clip;\npadding-right = PPLENGTH;\npadding-left = PPLENGTH;\npadding-top = PPLENGTH;\npadding-bottom = PPLENGTH;\nPAGE_BREAK = auto | always | avoid | left | right | recto | verso;\npage-break-after = PAGE_BREAK;\npage-break-before = PAGE_BREAK;\npage-break-inside = avoid | auto;\nposition = static | relative | absolute | fixed | running(IDENT);\nquotes = [STRING STRING]+ | none | auto;\nright = APLENGTH;\ntable-layout = auto | fixed;\ntext-align = left | right | center | justify | start | end | match-parent | inside | outside;\ntext-indent = PLENGTH;\ntext-transform = capitalize | uppercase | lowercase | none;\ntop = APLENGTH;\nvertical-align = baseline | sub | super | top | text-top | middle | bottom | text-bottom | PLENGTH;\nvisibility = visible | hidden | collapse;\nwhite-space = normal | pre | nowrap | pre-wrap | pre-line | break-spaces;\nwidows = POS_INT;\nwidth = PAPLENGTH | MIN_MAX_FIT_CONTENT;\nword-spacing = normal | LENGTH_OR_NUM;\nz-index = auto | INT;\n\n[epub,moz,webkit]hyphens = auto | manual | none;\n[webkit]hyphenate-character = auto | STRING;\n\n/* css-logical */\nmargin-block-start = APLENGTH;\nmargin-block-end = APLENGTH;\nmargin-inline-start = APLENGTH;\nmargin-inline-end = APLENGTH;\npadding-block-start = APLENGTH;\npadding-block-end = APLENGTH;\npadding-inline-start = APLENGTH;\npadding-inline-end = APLENGTH;\nborder-block-start-color = BORDER_SIDE_COLOR;\nborder-block-end-color = BORDER_SIDE_COLOR;\nborder-inline-start-color = BORDER_SIDE_COLOR;\nborder-inline-end-color = BORDER_SIDE_COLOR;\nborder-block-start-style = BORDER_SIDE_STYLE;\nborder-block-end-style = BORDER_SIDE_STYLE;\nborder-inline-start-style = BORDER_SIDE_STYLE;\nborder-inline-end-style = BORDER_SIDE_STYLE;\nborder-block-start-width = BORDER_SIDE_WIDTH;\nborder-block-end-width = BORDER_SIDE_WIDTH;\nborder-inline-start-width = BORDER_SIDE_WIDTH;\nborder-inline-end-width = BORDER_SIDE_WIDTH;\nblock-start = APLENGTH;\nblock-end = APLENGTH;\ninline-start = APLENGTH;\ninline-end = APLENGTH;\nblock-size = PAPLENGTH | MIN_MAX_FIT_CONTENT;\ninline-size = PAPLENGTH | MIN_MAX_FIT_CONTENT;\nmax-block-size = NPLENGTH | MIN_MAX_FIT_CONTENT;\nmax-inline-size = NPLENGTH | MIN_MAX_FIT_CONTENT;\nmin-block-size = APLENGTH | MIN_MAX_FIT_CONTENT;\nmin-inline-size = APLENGTH | MIN_MAX_FIT_CONTENT;\n\nmargin-inside = auto | APLENGTH;\nmargin-outside = auto | APLENGTH;\npadding-inside = PPLENGTH;\npadding-outside = PPLENGTH;\nborder-inside-color = BORDER_SIDE_COLOR;\nborder-outside-color = BORDER_SIDE_COLOR;\nborder-inside-style = BORDER_SIDE_STYLE;\nborder-outside-style = BORDER_SIDE_STYLE;\nborder-inside-width = BORDER_SIDE_WIDTH;\nborder-outside-width = BORDER_SIDE_WIDTH;\ninside = APLENGTH;\noutside = APLENGTH;\n\nSHAPE = auto | rectangle( PLENGTH{4} ) | ellipse( PLENGTH{4} ) | circle( PLENGTH{3} ) |\n polygon( SPACE(PLENGTH+)+ );\n[epubx]shape-inside = SHAPE;\n[epubx,webkit]shape-outside = SHAPE;\n[epubx]wrap-flow = auto | both | start | end | maximum | clear | around /* epub al */;\n\nTRANSFORM_FUNCTION = matrix(NUM{6}) | translate(PLENGTH{1,2}) | translateX(PLENGTH) | translateY(PLENGTH) |\n scale(NUM{1,2}) | scaleX(NUM) | scaleY(NUM) | rotate(ANGLE) | skewX(ANGLE) | skewY(ANGLE);\n[epub]transform = none | TRANSFORM_FUNCTION+;\n[epub]transform-origin = [[[ top | bottom | left | right] PLENGTH?] | center | PLENGTH]{1,2}; /* relaxed */\n\nBOX = border-box | padding-box | content-box;\nSHADOW = SPACE(inset || LENGTH{2,4} || COLOR); /* relaxed */\n[webkit]background-size = COMMA( SPACE( [PLENGTH | auto ]{1,2} | cover | contain)+ );\n[webkit]background-origin = COMMA( BOX+ );\n[webkit]background-clip = COMMA( BOX+ );\n[webkit]box-shadow = none | COMMA( SHADOW+ );\ntext-shadow = none | COMMA( SHADOW+ );\n[webkit]box-decoration-break = slice | clone;\nFILTER_FUNCTION = blur(LENGTH) | brightness(NUM | PERCENTAGE) | contrast(NUM | PERCENTAGE) | drop-shadow(SPACE(LENGTH{2,3} COLOR?))\n | grayscale(NUM | PERCENTAGE) | hue-rotate(ANGLE) | invert(NUM | PERCENTAGE) | opacity(NUM | PERCENTAGE)\n | saturate(NUM | PERCENTAGE) | sepia(NUM | PERCENTAGE);\nFILTER_FUNCTION_LIST = FILTER_FUNCTION+;\n[webkit]filter = none | FILTER_FUNCTION_LIST;\n\nopacity = NUM;\n\n[moz,webkit]column-width = LENGTH | auto;\n[moz,webkit]column-count = INT | auto;\n[moz,webkit]column-gap = LENGTH | normal;\n[moz,webkit]column-rule-color = COLOR;\n[moz,webkit]column-rule-style = BORDER_SIDE_STYLE;\n[moz,webkit]column-rule-width = BORDER_SIDE_WIDTH;\nBREAK = auto | avoid | avoid-page | page | left | right | recto | verso | avoid-column | column | avoid-region | region;\nbreak-before = BREAK;\nbreak-after = BREAK;\nbreak-inside = auto | avoid | avoid-page | avoid-column | avoid-region;\n[webkit]column-span = none | auto | all;\n[moz]column-fill = auto | balance | balance-all;\nmargin-break = auto | keep | discard;\n\nsrc = COMMA([SPACE(URI format(STRING+)?) | local(FAMILY)]+); /* for font-face */\n\n[epubx,webkit]flow-from = IDENT;\n[epubx,webkit]flow-into = IDENT;\n[epubx]flow-linger = INT | none;\n[epubx]flow-priority = INT;\n[epubx]flow-options = none | [ exclusive || last || static ];\n[epubx]page = INT | auto | IDENT; /* page: IDENT is for CSS Paged Media */\n[epubx]min-page-width = LENGTH;\n[epubx]min-page-height = LENGTH;\n[epubx]required = true | false;\n[epubx]enabled = true | false;\n[epubx]conflicting-partitions = COMMA(IDENT+);\n[epubx]required-partitions = COMMA(IDENT+);\n[epubx]snap-height = LENGTH | none;\n[epubx]snap-width = LENGTH | none;\n[epubx]flow-consume = all | some;\n[epubx]utilization = NUM;\n[epubx]text-zoom = font-size | scale;\n\n[adapt]template = URI_OR_NONE | footnote;\n[adapt]behavior = IDENT;\n\n/* CSS Fonts */\nCOMMON_LIG_VALUES = [ common-ligatures | no-common-ligatures ];\nDISCRETIONARY_LIG_VALUES = [ discretionary-ligatures | no-discretionary-ligatures ];\nHISTORICAL_LIG_VALUES = [ historical-ligatures | no-historical-ligatures ];\nCONTEXTUAL_ALT_VALUES = [ contextual | no-contextual ];\nfont-variant-ligatures = normal | none | [ COMMON_LIG_VALUES || DISCRETIONARY_LIG_VALUES || HISTORICAL_LIG_VALUES || CONTEXTUAL_ALT_VALUES ];\nfont-variant-caps = normal | small-caps | all-small-caps | petite-caps | all-petite-caps | unicase | titling-caps;\nNUMERIC_FIGURE_VALUES = [ lining-nums | oldstyle-nums ];\nNUMERIC_SPACING_VALUES = [ proportional-nums | tabular-nums ];\nNUMERIC_FRACTION_VALUES = [ diagonal-fractions | stacked-fractions ];\nfont-variant-numeric = normal | [ NUMERIC_FIGURE_VALUES || NUMERIC_SPACING_VALUES || NUMERIC_FRACTION_VALUES || ordinal || slashed-zero ];\nEAST_ASIAN_VARIANT_VALUES = [ jis78 | jis83 | jis90 | jis04 | simplified | traditional ];\nEAST_ASIAN_WIDTH_VALUES = [ full-width | proportional-width ];\nfont-variant-east-asian = normal | [ EAST_ASIAN_VARIANT_VALUES || EAST_ASIAN_WIDTH_VALUES || ruby ];\nfont-variant_css2 = normal | small-caps; /* for font shorthand */\nfont-size-adjust = none | NNEG_NUM;\n[webkit]font-kerning = auto | normal | none;\nfont-feature-settings = COMMA( normal | SPACE( STRING [ on | off | INT ]? )+ );\nFONT_STRETCH_CSS3_VALUES = normal | wider | narrower | ultra-condensed | extra-condensed | condensed | semi-condensed | semi-expanded | expanded | extra-expanded | ultra-expanded;\nfont-stretch = FONT_STRETCH_CSS3_VALUES | PERCENTAGE;\nfont-stretch_css3 = FONT_STRETCH_CSS3_VALUES; /* for font shorthand */\nfont-display = [ auto | block | swap | fallback | optional ];\nunicode-range = COMMA( URANGE+ );\n\n/* CSS Images */\nimage-resolution = RESOLUTION;\nobject-fit = fill | contain | cover | none | scale-down;\nobject-position = COMMA( SPACE(BG_POSITION_TERM{1,4})+ ); /* relaxed */\n\n/* CSS Paged Media */\nPAGE_SIZE = a10 | a9 | a8 | a7 | a6 | a5 | a4 | a3 | a2 | a1 | a0\n | b10 | b9 | b8 | b7 | b6 | b5 | b4 | b3 | b2 | b1 | b0\n | c10 | c9 | c8 | c7 | c6 | c5 | c4 | c3 | c2 | c1 | c0\n | jis-b10 | jis-b9 | jis-b8 | jis-b7 | jis-b6 | jis-b5 | jis-b4 | jis-b3 | jis-b2 | jis-b1 | jis-b0\n | letter | legal | ledger;\nbleed = auto | LENGTH;\nmarks = none | [ crop || cross ];\nsize = POS_LENGTH{1,2} | auto | [ PAGE_SIZE || [ portrait | landscape ] ];\ncrop-offset = auto | LENGTH;\ncrop-marks-line-color = auto | COLOR;\n\n/* CSS Page Floats */\nclear = none | left | right | top | bottom | inline-start | inline-end | block-start | block-end | inside | outside | both | all | same | column | region | page;\nfloat-reference = inline | column | region | page;\nfloat = none | footnote | [ block-start || block-end || inline-start || inline-end || snap-block || snap-inline || left || right || top || bottom || inside || outside ];\nfloat-min-wrap-block = PPLENGTH;\n\n/* CSS Ruby */\nruby-align = start | center | space-between | space-around;\nruby-position = over | under | inter-character;\n\n/* CSS Size Adjust */\n[moz,webkit]text-size-adjust = auto | none | POS_PERCENTAGE;\n\n/* CSS Text */\n[webkit]line-break = auto | loose | normal | strict | anywhere;\noverflow-wrap = normal | break-word | anywhere;\n[moz]tab-size = NNEG_INT | NNEG_LENGTH;\n[moz]text-align-last = auto | start | end | left | right | center | justify | inside | outside;\ntext-justify = auto | none | inter-word | inter-character;\nword-break = normal | keep-all | break-all | break-word;\ntext-spacing-trim = auto | normal | space-all | trim-both | trim-auto |\n [[ trim-start | space-start | space-first ] ||\n [ trim-end | space-end | allow-end ] ||\n [ trim-adjacent | space-adjacent ]];\ntext-autospace = normal | auto | no-autospace |\n [[ ideograph-alpha || ideograph-numeric || punctuation ] || [ insert | replace ]];\nhanging-punctuation = none | [ first || [ force-end | allow-end ] || last ];\n\n/* CSS Text Decoration */\n[webkit]text-decoration-color = COLOR;\n[webkit]text-decoration-line = none | [ underline || overline || line-through || blink ];\n[webkit]text-decoration-skip = none | [ objects || spaces || ink || edges || box-decoration ];\n[webkit]text-decoration-style = solid | double | dotted | dashed | wavy;\n[webkit]text-decoration-thickness = from-font | APLENGTH;\n[epub,webkit]text-emphasis-color = COLOR;\n[webkit]text-emphasis-position = [ over | under ] [ right | left ];\n[epub,webkit]text-emphasis-style = none | [[ filled | open ] || [ dot | circle | double-circle | triangle | sesame ]] | STRING;\n[webkit]text-underline-position = auto | [ under || [ left | right ]];\n\n/* CSS Transforms */\n[webkit]backface-visibility = visible | hidden;\n\n/* CSS UI */\n[moz,webkit]box-sizing = content-box | padding-box | border-box;\ntext-overflow = [clip | ellipsis | STRING]{1,2};\n\n/* CSS Writing Modes */\n[epub,webkit]text-combine = none | horizontal;\ntext-combine-upright = none | all; /* relaxed */\n[epub,webkit]text-orientation = mixed | upright | sideways-right | sideways-left | sideways | use-glyph-orientation /* the following values are kept for backward-compatibility */ | vertical-right | rotate-right | rotate-left | rotate-normal | auto;\nunicode-bidi = normal | embed | isolate | bidi-override | isolate-override | plaintext;\n[epub,webkit]writing-mode = horizontal-tb | vertical-rl | lr-tb | rl-tb | tb-rl | lr | rl | tb;\n\n/* CSS Flex box */\nFLEX_BASIS = content | PAPLENGTH;\nflex-direction = row | row-reverse | column | column-reverse;\nflex-wrap = nowrap | wrap | wrap-reverse;\norder = INT;\nflex-grow = NNEG_NUM;\nflex-shrink = NNEG_NUM;\nflex-basis = FLEX_BASIS;\nflex = none | [ [ NNEG_NUM NNEG_NUM? ] || FLEX_BASIS ];\njustify-content = flex-start | flex-end | center | space-between | space-around;\nalign-items = flex-start | flex-end | center | baseline | stretch;\nalign-self = auto | flex-start | flex-end | center | baseline | stretch;\nalign-content = flex-start | flex-end | center | space-between | space-around | stretch;\n\n/* Pointer Events */\ntouch-action = auto | none | [ pan-x || pan-y ] | manipulation;\n\n/* SVG 2 */\nOPACITY_VALUE = NUM | PERCENTAGE;\nDASH_ARRAY = COMMA( SPACE( [ LENGTH | PERCENTAGE | NUM ]+ )+ );\nPAINT = none | child | child(INT) | COLOR | SPACE( URI [none | COLOR]? ) | context-fill | context-stroke;\ncolor-interpolation = auto | sRGB | linearRGB;\ncolor-rendering = auto | optimizeSpeed | optimizeQuality;\nfill = PAINT;\nfill-opacity = OPACITY_VALUE;\nfill-rule = nonzero | evenodd;\nglyph-orientation-vertical = auto | NUM | ANGLE;\nimage-rendering = auto | optimizeSpeed | optimizeQuality | crisp-edges | pixelated;\nmarker-start = none | URI;\nmarker-mid = none | URI;\nmarker-end = none | URI;\npointer-events = bounding-box | visiblePainted | visibleFill | visibleStroke | visible | painted | fill | stroke | all | none;\npaint-order = normal | [ fill || stroke || markers ];\nshape-rendering = auto | optimizeSpeed | crispEdges | geometricPrecision;\nstop-color = COLOR;\nstop-opacity = OPACITY_VALUE;\nstroke = PAINT;\nstroke-dasharray = none | DASH_ARRAY;\nstroke-dashoffset = PERCENTAGE | LENGTH_OR_NUM;\nstroke-linecap = butt | round | square;\nstroke-linejoin = miter | round | bevel;\nstroke-miterlimit = NUM;\nstroke-opacity = OPACITY_VALUE;\nstroke-width = PERCENTAGE | LENGTH_OR_NUM;\ntext-anchor = start | middle | end;\ntext-rendering = auto | optimizeSpeed | optimizeLegibility | geometricPrecision;\nvector-effect = none | SPACE( [ non-scaling-stroke | non-scaling-size | non-rotation | fixed-position ]+ [ viewport | screen ]? );\n\n/* SVG 1.1 */\nalignment-baseline = auto | baseline | before-edge | text-before-edge | middle | central | after-edge | text-after-edge | ideographic | alphabetic | hanging | mathematical;\nbaseline-shift = baseline | sub | super | PERCENTAGE | LENGTH_OR_NUM;\ndominant-baseline = auto | use-script | no-change | reset-size | ideographic | alphabetic | hanging | mathematical | central | middle | text-after-edge | text-before-edge;\nmask = none | URI;\n\n/* css-masking-1 */\nSHAPE_RADIUS = PLENGTH | closest-side | farthest-side;\nFILL_RULE = nonzero | evenodd;\nSHAPE_BOX = BOX | margin-box;\nGEOMETRY_BOX = SHAPE_BOX | fill-box | stroke-box | view-box;\nBASIC_SHAPE =\n inset( SPACE( PLENGTH{1,4} [ round PLENGTH{1,4} [ SLASH PLENGTH{1,4} ]? ]? ) )\n | circle( SPACE( [SHAPE_RADIUS]? [at BG_POSITION_TERM{1,4}]? ) )\n | ellipse( SPACE( SHAPE_RADIUS{2}? [at BG_POSITION_TERM{1,4}]? ) )\n | polygon( FILL_RULE? COMMA( SPACE( PLENGTH{2} )+ )+ );\n[webkit]clip-path = none | URI | [ BASIC_SHAPE || GEOMETRY_BOX ];\nclip-rule = nonzero | evenodd;\n\n/* filters */\nflood-color = COLOR;\nflood-opacity = OPACITY_VALUE;\nlighting-color = COLOR;\n\n/* compositing-1 */\nBLEND_MODE = normal | multiply | screen | overlay | darken | lighten | color-dodge | color-burn | hard-light | soft-light | difference | exclusion | hue | saturation | color | luminosity;\nmix-blend-mode = BLEND_MODE;\nisolation = auto | isolate;\nbackground-blend-mode = COMMA( BLEND_MODE+ );\n\n/* CSS GCPM */\nstring-set = COMMA( SPACE( IDENT CONTENT_LIST )+ | none );\nfootnote-policy = auto | line;\n\n/* CSS Repeated Headers and Footers */\n[viv]repeat-on-break = auto | none | header | footer;\n\n/* Compatibility */\n[webkit]text-fill-color = COLOR;\n[webkit]text-stroke-color = COLOR;\n[webkit]text-stroke-width = BORDER_SIDE_WIDTH;\n\nDEFAULTS\n\nbackground-attachment: scroll;\nbackground-color: transparent;\nbackground-image: none;\nbackground-repeat: repeat;\nbackground-position: 0% 0%;\nbackground-clip: border-box;\nbackground-origin: padding-box;\nbackground-size: auto;\nborder-top-color: currentColor;\nborder-right-color: currentColor;\nborder-bottom-color: currentColor;\nborder-left-color: currentColor;\nborder-top-style: none;\nborder-right-style: none;\nborder-bottom-style: none;\nborder-left-style: none;\nborder-top-width: 3px;\nborder-right-width: 3px;\nborder-bottom-width: 3px;\nborder-left-width: 3px;\nborder-top-left-radius: 0;\nborder-top-right-radius: 0;\nborder-bottom-right-radius: 0;\nborder-bottom-left-radius: 0;\nborder-image-source: none;\nborder-image-slice: 100%;\nborder-image-width: 1;\nborder-image-outset: 0;\nborder-image-repeat: stretch;\ncolumn-count: auto;\ncolumn-gap: normal;\ncolumn-width: auto;\ncolumn-rule-color: currentColor;\ncolumn-rule-style: none;\ncolumn-rule-width: 3px;\ncolumn-fill: balance;\noutline-color: currentColor;\noutline-style: none;\noutline-width: 3px;\nflex-direction: row;\nflex-wrap: nowrap;\nfont-family: serif;\nfont-style: normal;\nfont-size: medium;\nfont-size-adjust: none;\nfont-kerning: auto;\nfont-feature-settings: normal;\nfont-variant-ligatures: normal;\nfont-variant-caps: normal;\nfont-variant-numeric: normal;\nfont-variant-east-asian: normal;\nfont-weight: normal;\nfont-stretch: normal;\nline-height: normal;\nlist-style-image: none;\nlist-style-position: outside;\nlist-style-type: disc;\nmargin-bottom: auto;\nmargin-left: auto;\nmargin-right: auto;\nmargin-top: auto;\npadding-bottom: auto;\npadding-left: auto;\npadding-right: auto;\npadding-top: auto;\ntext-autospace: normal;\ntext-emphasis-color: currentColor;\ntext-emphasis-style: none;\ntext-spacing-trim: normal;\ntext-stroke-color: currentColor;\ntext-stroke-width: 0;\nmarker-start: none;\nmarker-mid: none;\nmarker-end: none;\n\n/* css-logical */\nborder-block-start-color: currentColor;\nborder-block-end-color: currentColor;\nborder-inline-start-color: currentColor;\nborder-inline-end-color: currentColor;\nborder-inside-color: currentColor;\nborder-outside-color: currentColor;\nborder-block-start-style: none;\nborder-block-end-style: none;\nborder-inline-start-style: none;\nborder-inline-end-style: none;\nborder-inside-style: none;\nborder-outside-style: none;\nborder-block-start-width: 3px;\nborder-block-end-width: 3px;\nborder-inline-start-width: 3px;\nborder-inline-end-width: 3px;\nborder-inside-width: 3px;\nborder-outside-width: 3px;\n\nSHORTHANDS\n\nall = ALL;\nbackground = COMMA background-image [background-position [ / background-size ]] background-repeat\n background-attachment [background-origin background-clip] background-color; /* background-color is a special case, see the code */\nborder-top = border-top-width border-top-style border-top-color;\nborder-right = border-right-width border-right-style border-right-color;\nborder-bottom = border-bottom-width border-bottom-style border-bottom-color;\nborder-left = border-left-width border-left-style border-left-color;\nborder-inside = border-inside-width border-inside-style border-inside-color;\nborder-outside = border-outside-width border-outside-style border-outside-color;\nborder-width = INSETS border-top-width border-right-width border-bottom-width border-left-width;\nborder-style = INSETS border-top-style border-right-style border-bottom-style border-left-style;\nborder-color = INSETS border-top-color border-right-color border-bottom-color border-left-color;\nborder = border-width border-style border-color;\nborder-image = border-image-source border-image-slice [ / border-image-width [ / border-image-outset ] ]\n border-image-repeat;\nborder-radius = INSETS_SLASH border-top-left-radius border-top-right-radius\n border-bottom-right-radius border-bottom-left-radius;\n[moz,webkit]columns = column-width column-count;\n[moz,webkit]column-rule = column-rule-width column-rule-style column-rule-color;\nflex-flow = flex-direction flex-wrap;\noeb-column-number = column-count;\noutline = outline-width outline-style outline-color;\nlist-style = list-style-position list-style-type list-style-image;\nmargin = INSETS margin-top margin-right margin-bottom margin-left;\npadding = INSETS padding-top padding-right padding-bottom padding-left;\nfont = FONT font-style font-variant_css2 font-weight font-stretch_css3 /* font-size line-height font-family are special-cased */;\nfont-variant = font-variant-ligatures font-variant-caps font-variant-numeric font-variant-east-asian;\n[epub,webkit]text-emphasis = text-emphasis-style text-emphasis-color;\nmarker = INSETS marker-start marker-mid marker-end;\n[webkit]text-stroke = text-stroke-width text-stroke-color;\ntext-decoration = text-decoration-line text-decoration-color text-decoration-style text-decoration-thickness;\ntext-spacing = TEXT_SPACING text-autospace text-spacing-trim;\n\n/* css-logical */\nmargin-block = INSETS margin-block-start margin-block-end;\nmargin-inline = INSETS margin-inline-start margin-inline-end;\npadding-block = INSETS padding-block-start padding-block-end;\npadding-inline = INSETS padding-inline-start padding-inline-end;\nborder-block-width = INSETS border-block-start-width border-block-end-width;\nborder-block-style = INSETS border-block-start-style border-block-end-style;\nborder-block-color = INSETS border-block-start-color border-block-end-color;\nborder-inline-width = INSETS border-inline-start-width border-inline-end-width;\nborder-inline-style = INSETS border-inline-start-style border-inline-end-style;\nborder-inline-color = INSETS border-inline-start-color border-inline-end-color;\nborder-block = border-block-width border-block-style border-block-color;\nborder-inline = border-inline-width border-inline-style border-inline-color;\nborder-block-start = border-block-start-width border-block-start-style border-block-start-color;\nborder-block-end = border-block-end-width border-block-end-style border-block-end-color;\nborder-inline-start = border-inline-start-width border-inline-start-style border-inline-start-color;\nborder-inline-end = border-inline-end-width border-inline-end-style border-inline-end-color;\ninset-block-start = block-start;\ninset-block-end = block-end;\ninset-inline-start = inline-start;\ninset-inline-end = inline-end;\ninset-inside = inside;\ninset-outside = outside;\ninset-block = INSETS block-start block-end;\ninset-inline = INSETS inline-start inline-end;\ninset = INSETS top right bottom left;\n\n/* old names */\nword-wrap = overflow-wrap;\n[adapt,webkit]margin-before = margin-block-start;\n[adapt,webkit]margin-after = margin-block-end;\n[adapt,webkit]margin-start = margin-inline-start;\n[adapt,webkit]margin-end = margin-inline-end;\n[adapt,webkit]padding-before = padding-block-start;\n[adapt,webkit]padding-after = padding-block-end;\n[adapt,webkit]padding-start = padding-inline-start;\n[adapt,webkit]padding-end = padding-inline-end;\n[adapt,webkit]border-before-color = border-block-start-color;\n[adapt,webkit]border-after-color = border-block-end-color;\n[adapt,webkit]border-start-color = border-inline-start-color;\n[adapt,webkit]border-end-color = border-inline-end-color;\n[adapt,webkit]border-before-style = border-block-start-style;\n[adapt,webkit]border-after-style = border-block-end-style;\n[adapt,webkit]border-start-style = border-inline-start-style;\n[adapt,webkit]border-end-style = border-inline-end-style;\n[adapt,webkit]border-before-width = border-block-start-width;\n[adapt,webkit]border-after-width = border-block-end-width;\n[adapt,webkit]border-start-width = border-inline-start-width;\n[adapt,webkit]border-end-width = border-inline-end-width;\n[adapt,webkit]before = block-start;\n[adapt,webkit]after = block-end;\n[adapt,webkit]start = inline-start;\n[adapt,webkit]end = inline-end;\n\n";
26
26
  /** user-agent.xml */
27
27
  export declare const UserAgentXml = "\n<!DOCTYPE html>\n<html xmlns=\"http://www.w3.org/1999/xhtml\" xmlns:s=\"http://www.pyroxy.com/ns/shadow\">\n<head>\n<style><![CDATA[\n\n.-vivliostyle-footnote-content {\n float: footnote;\n}\n\n.-vivliostyle-table-cell-container {\n display: block;\n}\n\n]]></style>\n</head>\n<body>\n\n<s:template id=\"footnote\"><s:content/><s:include class=\"-vivliostyle-footnote-content\"/></s:template>\n\n<s:template id=\"table-cell\"><div data-vivliostyle-flow-root=\"true\" class=\"-vivliostyle-table-cell-container\"><s:content/></div></s:template>\n\n</body>\n</html>";
28
28
  /** user-agent-page.css */
29
29
  export declare const UserAgentPageCss = "\n@namespace \"http://www.w3.org/1999/xhtml\";\n\n:root {\n hyphens: -epubx-expr(pref-hyphenate? \"auto\": \"manual\");\n}\n:root[data-vivliostyle-epub-spine-properties~=\"page-spread-left\"] {\n break-before: left;\n}\n:root[data-vivliostyle-epub-spine-properties~=\"page-spread-right\"] {\n break-before: right;\n}\n\n@-adapt-footnote-area {\n display: block;\n margin-block-start: 0.5em;\n margin-block-end: 0.5em;\n}\n\n@-adapt-footnote-area ::before {\n display: block;\n border-block-start-width: 1px;\n border-block-start-style: solid;\n border-block-start-color: black;\n margin-block-end: 0.4em;\n margin-inline-start: 0;\n margin-inline-end: 60%;\n}\n\n/* default page master */\n@-epubx-page-master :background-host {\n @-epubx-partition :layout-host {\n -epubx-flow-from: body;\n top: -epubx-expr(header.margin-bottom-edge);\n bottom: -epubx-expr(page-height - footer.margin-top-edge);\n left: 0px;\n right: 0px;\n column-width: 25em;\n }\n @-epubx-partition footer :oeb-page-foot {\n writing-mode: horizontal-tb;\n -epubx-flow-from: oeb-page-foot;\n bottom: 0px;\n left: 0px;\n right: 0px;\n }\n @-epubx-partition header :oeb-page-head {\n writing-mode: horizontal-tb;\n -epubx-flow-from: oeb-page-head;\n top: 0px;\n left: 0px;\n right: 0px;\n }\n}\n\n@page {\n @top-left-corner {\n text-align: right;\n vertical-align: middle;\n }\n @top-left {\n text-align: left;\n vertical-align: middle;\n }\n @top-center {\n text-align: center;\n vertical-align: middle;\n }\n @top-right {\n text-align: right;\n vertical-align: middle;\n }\n @top-right-corner {\n text-align: left;\n vertical-align: middle;\n }\n @left-top {\n text-align: center;\n vertical-align: top;\n }\n @left-middle {\n text-align: center;\n vertical-align: middle;\n }\n @left-bottom {\n text-align: center;\n vertical-align: bottom;\n }\n @right-top {\n text-align: center;\n vertical-align: top;\n }\n @right-middle {\n text-align: center;\n vertical-align: middle;\n }\n @right-bottom {\n text-align: center;\n vertical-align: bottom;\n }\n @bottom-left-corner {\n text-align: right;\n vertical-align: middle;\n }\n @bottom-left {\n text-align: left;\n vertical-align: middle;\n }\n @bottom-center {\n text-align: center;\n vertical-align: middle;\n }\n @bottom-right {\n text-align: right;\n vertical-align: middle;\n }\n @bottom-right-corner {\n text-align: left;\n vertical-align: middle;\n }\n}\n\n@media print {\n @page {\n margin: 10%;\n }\n}\n";
30
30
  /** user-agent-base.css */
31
- export declare const UserAgentBaseCss = "\n@namespace \"http://www.w3.org/1999/xhtml\";\n@namespace m \"http://www.w3.org/1998/Math/MathML\";\n@namespace epub \"http://www.idpf.org/2007/ops\";\n\nhtml,\naddress,\nblockquote,\nbody,\ndd,\ndiv,\ndl,\ndt,\nfieldset,\nform,\nframe,\nframeset,\nh1,\nh2,\nh3,\nh4,\nh5,\nh6,\nnoframes,\nol,\np,\nul,\ncenter,\ndir,\nhr,\nmenu,\npre,\ndetails,\ndialog,\nlegend,\nlisting,\noptgroup,\noption,\nplaintext,\nsearch,\nxmp,\narticle,\nsection,\nnav,\naside,\nhgroup,\nfooter,\nheader,\nfigure,\nfigcaption,\nmain {\n display: block;\n}\nli {\n display: list-item;\n}\nhead {\n display: none !important;\n}\ntable {\n display: table;\n}\ntr {\n display: table-row;\n}\nthead {\n display: table-header-group;\n break-after: avoid;\n}\ntbody {\n display: table-row-group;\n}\ntfoot {\n display: table-footer-group;\n break-before: avoid;\n}\ncol {\n display: table-column;\n}\ncolgroup {\n display: table-column-group;\n}\ntd,\nth {\n display: table-cell;\n}\ncaption {\n display: table-caption;\n text-align: center;\n}\nth {\n font-weight: bolder;\n text-align: center;\n}\n*[hidden],\nlink,\nstyle,\nscript {\n display: none;\n}\nh1 {\n font-size: 2em;\n margin-block: 0.67em;\n}\nh2 {\n font-size: 1.5em;\n margin-block: 0.83em;\n}\nh3 {\n font-size: 1.17em;\n margin-block: 1em;\n}\nh4 {\n font-size: 1em;\n margin-block: 1.33em;\n}\nh5 {\n font-size: 0.83em;\n margin-block: 1.67em;\n}\nh6 {\n font-size: 0.67em;\n margin-block: 2.33em;\n}\nh1,\nh2,\nh3,\nh4,\nh5,\nh6 {\n font-weight: bold;\n break-after: avoid;\n}\np,\nblockquote,\nfigure,\nul,\nol,\ndl,\ndir,\nmenu {\n margin-block: 1em;\n}\nb,\nstrong {\n font-weight: bolder;\n}\nblockquote,\nfigure {\n margin-inline: 40px;\n}\ni,\ncite,\ndfn,\nem,\nvar,\naddress {\n font-style: italic;\n}\npre,\ntt,\ncode,\nkbd,\nsamp {\n font-family: monospace;\n text-spacing: none;\n hanging-punctuation: none;\n}\nlisting,\nplaintext,\nxmp,\npre {\n white-space: pre;\n}\npre[wrap] {\n white-space: pre-wrap;\n}\nbutton,\ntextarea,\ninput,\nselect {\n display: inline-block;\n}\nbig {\n font-size: 1.17em;\n}\nsmall,\nsub,\nsup {\n font-size: 0.83em;\n}\nsub {\n vertical-align: sub;\n}\nsup {\n vertical-align: super;\n}\ntable {\n box-sizing: border-box;\n border-spacing: 2px;\n border-collapse: separate;\n text-indent: initial;\n}\nthead,\ntbody,\ntfoot,\ntable > tr {\n vertical-align: middle;\n}\ntr,\ntd,\nth {\n vertical-align: inherit;\n}\ns,\nstrike,\ndel {\n text-decoration: line-through;\n}\nhr {\n border-style: inset;\n border-width: 1px;\n margin-block: 0.5em;\n}\nhr[color],\nhr[noshade] {\n border-style: solid;\n}\nol,\nul,\ndir,\nmenu {\n padding-inline-start: 40px;\n}\ndd {\n margin-inline-start: 40px;\n}\nol ul,\nul ol,\nul ul,\nol ol {\n margin-block: 0;\n}\nu,\nins {\n text-decoration: underline;\n}\ncenter {\n text-align: center;\n}\nq::before {\n content: open-quote;\n}\nq::after {\n content: close-quote;\n}\n\nruby {\n display: ruby;\n}\nrp {\n display: none;\n}\nrbc {\n display: ruby-base-container;\n}\nrtc {\n display: ruby-text-container;\n}\nrb {\n display: ruby-base;\n white-space: nowrap;\n}\nrt {\n display: ruby-text;\n}\nrtc,\nrt {\n text-emphasis: none;\n white-space: nowrap;\n line-height: 1;\n}\nrtc,\nrt {\n font-size: 50%;\n}\nrtc:lang(zh-TW),\nrt:lang(zh-TW) {\n font-size: 30%;\n}\nrtc > rt,\nrtc > rt:lang(zh-TW) {\n font-size: 100%;\n}\n\n/* Bidi settings */\nbdo[dir=\"ltr\"] {\n direction: ltr;\n unicode-bidi: bidi-override;\n}\nbdo[dir=\"rtl\"] {\n direction: rtl;\n unicode-bidi: bidi-override;\n}\n*[dir=\"ltr\"] {\n direction: ltr;\n unicode-bidi: isolate;\n}\n*[dir=\"rtl\"] {\n direction: rtl;\n unicode-bidi: isolate;\n}\n\n/* MathML */\nm|math[display=\"block\"] {\n display: block;\n display: block math;\n}\n\n/*------------------ epub-specific ---------------------*/\n\na[epub|type=\"noteref\"],\na[epub\\:type=\"noteref\"] {\n font-size: 0.75em;\n vertical-align: super;\n line-height: 0.01;\n}\n\na[epub|type=\"noteref\"]:href-epub-type(footnote, aside),\na[epub\\:type=\"noteref\"]:href-epub-type(footnote, aside) {\n -adapt-template: footnote;\n text-decoration: none;\n}\n\naside[epub|type=\"footnote\"],\naside[epub\\:type=\"footnote\"] {\n display: none;\n}\n\naside[epub|type=\"footnote\"]:footnote-content,\naside[epub\\:type=\"footnote\"]:footnote-content {\n display: block;\n margin: 0.25em;\n font-size: 1.2em;\n line-height: 1.2;\n}\n\nepub|trigger {\n display: none;\n}\n\nepub|switch {\n display: inline;\n}\n\nepub|default {\n display: inline;\n}\n\nepub|case {\n display: none;\n}\n\nepub|case[required-namespace::supported] {\n display: inline;\n}\n\nepub|case[required-namespace::supported] ~ epub|case {\n display: none;\n}\n\nepub|case[required-namespace::supported] ~ epub|default {\n display: none;\n}\n";
31
+ export declare const UserAgentBaseCss = "\n@namespace \"http://www.w3.org/1999/xhtml\";\n@namespace m \"http://www.w3.org/1998/Math/MathML\";\n@namespace epub \"http://www.idpf.org/2007/ops\";\n\nhtml,\naddress,\nblockquote,\nbody,\ndd,\ndiv,\ndl,\ndt,\nfieldset,\nform,\nframe,\nframeset,\nh1,\nh2,\nh3,\nh4,\nh5,\nh6,\nnoframes,\nol,\np,\nul,\ncenter,\ndir,\nhr,\nmenu,\npre,\ndetails,\ndialog,\nlegend,\nlisting,\noptgroup,\noption,\nplaintext,\nsearch,\nxmp,\narticle,\nsection,\nnav,\naside,\nhgroup,\nfooter,\nheader,\nfigure,\nfigcaption,\nmain {\n display: block;\n}\nli {\n display: list-item;\n}\nhead {\n display: none !important;\n}\ntable {\n display: table;\n}\ntr {\n display: table-row;\n}\nthead {\n display: table-header-group;\n break-after: avoid;\n}\ntbody {\n display: table-row-group;\n}\ntfoot {\n display: table-footer-group;\n break-before: avoid;\n}\ncol {\n display: table-column;\n}\ncolgroup {\n display: table-column-group;\n}\ntd,\nth {\n display: table-cell;\n}\ncaption {\n display: table-caption;\n text-align: center;\n}\nth {\n font-weight: bolder;\n text-align: center;\n}\n*[hidden],\nlink,\nstyle,\nscript {\n display: none;\n}\nh1 {\n font-size: 2em;\n margin-block: 0.67em;\n}\nh2 {\n font-size: 1.5em;\n margin-block: 0.83em;\n}\nh3 {\n font-size: 1.17em;\n margin-block: 1em;\n}\nh4 {\n font-size: 1em;\n margin-block: 1.33em;\n}\nh5 {\n font-size: 0.83em;\n margin-block: 1.67em;\n}\nh6 {\n font-size: 0.67em;\n margin-block: 2.33em;\n}\nh1,\nh2,\nh3,\nh4,\nh5,\nh6 {\n font-weight: bold;\n break-after: avoid;\n}\np,\nblockquote,\nfigure,\nul,\nol,\ndl,\ndir,\nmenu {\n margin-block: 1em;\n}\nb,\nstrong {\n font-weight: bolder;\n}\nblockquote,\nfigure {\n margin-inline: 40px;\n}\ni,\ncite,\ndfn,\nem,\nvar,\naddress {\n font-style: italic;\n}\npre,\ntt,\ncode,\nkbd,\nsamp {\n font-family: monospace;\n text-spacing: none;\n hanging-punctuation: none;\n}\nlisting,\nplaintext,\nxmp,\npre {\n white-space: pre;\n}\npre[wrap] {\n white-space: pre-wrap;\n}\nbutton,\ntextarea,\ninput,\nselect {\n display: inline-block;\n}\nbig {\n font-size: 1.17em;\n}\nsmall,\nsub,\nsup {\n font-size: 0.83em;\n}\nsub {\n vertical-align: sub;\n}\nsup {\n vertical-align: super;\n}\ntable {\n box-sizing: border-box;\n border-spacing: 2px;\n border-collapse: separate;\n text-indent: initial;\n}\nthead,\ntbody,\ntfoot,\ntable > tr {\n vertical-align: middle;\n}\ntr,\ntd,\nth {\n vertical-align: inherit;\n}\ns,\nstrike,\ndel {\n text-decoration: line-through;\n}\nhr {\n border-style: inset;\n border-width: 1px;\n margin-block: 0.5em;\n}\nhr[color],\nhr[noshade] {\n border-style: solid;\n}\nol,\nul,\ndir,\nmenu {\n padding-inline-start: 40px;\n}\ndd {\n margin-inline-start: 40px;\n}\nol ul,\nul ol,\nul ul,\nol ol {\n margin-block: 0;\n}\nul {\n list-style-type: disc;\n}\nol ul,\nul ul {\n list-style-type: circle;\n}\nol ol ul,\nol ul ul,\nul ol ul,\nul ul ul {\n list-style-type: square;\n}\nol { list-style-type: decimal; }\nol[type=\"1\"], li[type=\"1\"] { list-style-type: decimal; }\nol[type=a], li[type=a] { list-style-type: lower-alpha; }\nol[type=A], li[type=A] { list-style-type: upper-alpha; }\nol[type=i], li[type=i] { list-style-type: lower-roman; }\nol[type=I], li[type=I] { list-style-type: upper-roman; }\nul[type=none], li[type=none] { list-style-type: none; }\nul[type=disc], li[type=disc] { list-style-type: disc; }\nul[type=circle], li[type=circle] { list-style-type: circle; }\nul[type=square], li[type=square] { list-style-type: square; }\nu,\nins {\n text-decoration: underline;\n}\ncenter {\n text-align: center;\n}\nq::before {\n content: open-quote;\n}\nq::after {\n content: close-quote;\n}\n\nruby {\n display: ruby;\n}\nrp {\n display: none;\n}\nrbc {\n display: ruby-base-container;\n}\nrtc {\n display: ruby-text-container;\n}\nrb {\n display: ruby-base;\n white-space: nowrap;\n}\nrt {\n display: ruby-text;\n}\nrtc,\nrt {\n text-emphasis: none;\n white-space: nowrap;\n line-height: 1;\n}\nrtc,\nrt {\n font-size: 50%;\n}\nrtc:lang(zh-TW),\nrt:lang(zh-TW) {\n font-size: 30%;\n}\nrtc > rt,\nrtc > rt:lang(zh-TW) {\n font-size: 100%;\n}\n\n/* Bidi settings */\nbdo[dir=\"ltr\"] {\n direction: ltr;\n unicode-bidi: bidi-override;\n}\nbdo[dir=\"rtl\"] {\n direction: rtl;\n unicode-bidi: bidi-override;\n}\n*[dir=\"ltr\"] {\n direction: ltr;\n unicode-bidi: isolate;\n}\n*[dir=\"rtl\"] {\n direction: rtl;\n unicode-bidi: isolate;\n}\n\n/* MathML */\nm|math[display=\"block\"] {\n display: block;\n display: block math;\n}\n\n/*------------------ epub-specific ---------------------*/\n\na[epub|type=\"noteref\"],\na[epub\\:type=\"noteref\"] {\n font-size: 0.75em;\n vertical-align: super;\n line-height: 0.01;\n}\n\na[epub|type=\"noteref\"]:href-epub-type(footnote, aside),\na[epub\\:type=\"noteref\"]:href-epub-type(footnote, aside) {\n -adapt-template: footnote;\n text-decoration: none;\n}\n\naside[epub|type=\"footnote\"],\naside[epub\\:type=\"footnote\"] {\n display: none;\n}\n\naside[epub|type=\"footnote\"]:footnote-content,\naside[epub\\:type=\"footnote\"]:footnote-content {\n display: block;\n margin: 0.25em;\n font-size: 1.2em;\n line-height: 1.2;\n}\n\nepub|trigger {\n display: none;\n}\n\nepub|switch {\n display: inline;\n}\n\nepub|default {\n display: inline;\n}\n\nepub|case {\n display: none;\n}\n\nepub|case[required-namespace::supported] {\n display: inline;\n}\n\nepub|case[required-namespace::supported] ~ epub|case {\n display: none;\n}\n\nepub|case[required-namespace::supported] ~ epub|default {\n display: none;\n}\n";
32
32
  /** user-agent-toc.css */
33
33
  export declare const UserAgentTocCss = "\n@namespace \"http://www.w3.org/1999/xhtml\";\n\n*:not([data-vivliostyle-role=doc-toc],\n [data-vivliostyle-role=doc-toc] *,\n :has([data-vivliostyle-role=doc-toc]),\n :is(h1,h2,h3,h4,h5,h6):has(+:not(nav)[data-vivliostyle-role=doc-toc])) {\n display: none;\n}\n\n[hidden] {\n display: revert;\n}\n\n[data-vivliostyle-role=doc-toc] li a {\n -adapt-behavior: toc-node-anchor;\n}\n\n[data-vivliostyle-role=doc-toc] li {\n -adapt-behavior: toc-node;\n}\n\n[data-vivliostyle-role=doc-toc] li > :not(ul,ol):first-child {\n -adapt-behavior: toc-node-first-child;\n}\n\n[data-vivliostyle-role=doc-toc] :is(ol,ul),\n[data-vivliostyle-role=doc-toc]:is(ol,ul) {\n -adapt-behavior: toc-container;\n}\n";
34
34
  /** vivliostyle-polyfill.css */
35
- export declare const VivliostylePolyfillCss = "\n[data-viv-margin-discard~=\"block-start\"] {\n margin-block-start: 0 !important;\n}\n[data-viv-margin-discard~=\"block-end\"] {\n margin-block-end: 0 !important;\n}\n[data-viv-margin-discard~=\"inline-start\"] {\n margin-inline-start: 0 !important;\n}\n[data-viv-margin-discard~=\"inline-end\"] {\n margin-inline-end: 0 !important;\n}\n\n[data-viv-box-break~=\"inline-start\"]:not([data-viv-box-break~=\"clone\"]) {\n margin-inline-start: 0 !important;\n padding-inline-start: 0 !important;\n border-inline-start-width: 0 !important;\n border-start-start-radius: 0 !important;\n border-end-start-radius: 0 !important;\n}\n[data-viv-box-break~=\"inline-end\"]:not([data-viv-box-break~=\"clone\"]) {\n margin-inline-end: 0 !important;\n padding-inline-end: 0 !important;\n border-inline-end-width: 0 !important;\n border-start-end-radius: 0 !important;\n border-end-end-radius: 0 !important;\n}\n[data-viv-box-break~=\"block-start\"]:not([data-viv-box-break~=\"clone\"]):not(table[style*=\"border-collapse: collapse\"]:has(>thead)) {\n margin-block-start: 0 !important;\n padding-block-start: 0 !important;\n border-block-start-width: 0 !important;\n border-start-start-radius: 0 !important;\n border-start-end-radius: 0 !important;\n}\n[data-viv-box-break~=\"block-end\"]:not([data-viv-box-break~=\"clone\"]):not(table[style*=\"border-collapse: collapse\"]:has(>tfoot)) {\n margin-block-end: 0 !important;\n padding-block-end: 0 !important;\n border-block-end-width: 0 !important;\n border-end-start-radius: 0 !important;\n border-end-end-radius: 0 !important;\n}\n[data-viv-box-break~=\"block-start\"][data-viv-box-break~=\"text-start\"] {\n text-indent: 0 !important;\n}\n[data-viv-box-break~=\"block-end\"][data-viv-box-break~=\"text-end\"][data-viv-box-break~=\"justify\"] {\n text-align-last: justify !important;\n}\n[data-viv-box-break~=\"block-end\"][data-viv-box-break~=\"text-end\"][data-viv-box-break~=\"justify\"] > * {\n text-align-last: auto;\n}\n[data-viv-box-break~=\"block-end\"][data-viv-box-break~=\"text-end\"]:not([data-viv-box-break~=\"justify\"]) {\n text-align-last: auto !important;\n}\n\nspan.viv-anonymous-block {\n display: block;\n}\n\n[data-vivliostyle-page-container] {\n text-spacing-trim: space-all;\n text-autospace: no-autospace;\n}\nviv-ts-open.viv-ts-auto > viv-ts-inner,\nviv-ts-open.viv-ts-trim > viv-ts-inner {\n margin-inline-start: -0.5em;\n}\nviv-ts-close.viv-ts-auto > viv-ts-inner,\nviv-ts-close.viv-ts-trim > viv-ts-inner {\n letter-spacing: -0.5em;\n}\nviv-ts-close.viv-hang-end > viv-ts-inner,\nviv-ts-close.viv-hang-last > viv-ts-inner {\n letter-spacing: -1em;\n}\nviv-ts-open.viv-ts-auto::before,\nviv-ts-close.viv-ts-auto::after,\nviv-ts-close.viv-hang-end::after {\n content: \" \";\n font-family: Courier, monospace;\n word-spacing: normal;\n letter-spacing: -0.11em;\n line-height: 0;\n text-orientation: mixed;\n visibility: hidden;\n}\nviv-ts-close.viv-hang-end:not(.viv-hang-hw)::after {\n letter-spacing: 0.4em;\n}\nviv-ts-close.viv-hang-hw > viv-ts-inner {\n letter-spacing: -0.5em;\n}\nviv-ts-open.viv-hang-first > viv-ts-inner {\n display: inline-block;\n line-height: 1;\n inline-size: 1em;\n text-indent: 0;\n text-align: end;\n text-align-last: end;\n margin-inline-start: -1em;\n}\nviv-ts-thin-sp::after {\n content: \" \";\n font-family: Times, serif;\n word-spacing: normal;\n letter-spacing: -0.125em;\n line-height: 0;\n text-orientation: mixed;\n visibility: hidden;\n}\n[style*=text-decoration] :is(viv-ts-thin-sp, viv-ts-close.viv-ts-auto)::after {\n visibility: visible;\n}\n\nspan[data-viv-leader] {\n text-combine-upright: none;\n text-orientation: mixed;\n white-space: pre;\n}\n";
35
+ export declare const VivliostylePolyfillCss = "\n[data-viv-margin-discard~=\"block-start\"] {\n margin-block-start: 0 !important;\n}\n[data-viv-margin-discard~=\"block-end\"] {\n margin-block-end: 0 !important;\n}\n[data-viv-margin-discard~=\"inline-start\"] {\n margin-inline-start: 0 !important;\n}\n[data-viv-margin-discard~=\"inline-end\"] {\n margin-inline-end: 0 !important;\n}\n\n[data-viv-box-break~=\"inline-start\"]:not([data-viv-box-break~=\"clone\"]) {\n margin-inline-start: 0 !important;\n padding-inline-start: 0 !important;\n border-inline-start-width: 0 !important;\n border-start-start-radius: 0 !important;\n border-end-start-radius: 0 !important;\n}\n[data-viv-box-break~=\"inline-end\"]:not([data-viv-box-break~=\"clone\"]) {\n margin-inline-end: 0 !important;\n padding-inline-end: 0 !important;\n border-inline-end-width: 0 !important;\n border-start-end-radius: 0 !important;\n border-end-end-radius: 0 !important;\n}\n[data-viv-box-break~=\"block-start\"]:not([data-viv-box-break~=\"clone\"]):not(table[style*=\"border-collapse: collapse\"]:has(>thead)) {\n margin-block-start: 0 !important;\n padding-block-start: 0 !important;\n border-block-start-width: 0 !important;\n border-start-start-radius: 0 !important;\n border-start-end-radius: 0 !important;\n}\n[data-viv-box-break~=\"block-end\"]:not([data-viv-box-break~=\"clone\"]):not(table[style*=\"border-collapse: collapse\"]:has(>tfoot)) {\n margin-block-end: 0 !important;\n padding-block-end: 0 !important;\n border-block-end-width: 0 !important;\n border-end-start-radius: 0 !important;\n border-end-end-radius: 0 !important;\n}\n[data-viv-box-break~=\"block-start\"][data-viv-box-break~=\"text-start\"] {\n text-indent: 0 !important;\n}\n[data-viv-box-break~=\"block-end\"][data-viv-box-break~=\"text-end\"][data-viv-box-break~=\"justify\"] {\n text-align-last: justify !important;\n}\n[data-viv-box-break~=\"block-end\"][data-viv-box-break~=\"text-end\"][data-viv-box-break~=\"justify\"] > * {\n text-align-last: auto;\n}\n[data-viv-box-break~=\"block-end\"][data-viv-box-break~=\"text-end\"]:not([data-viv-box-break~=\"justify\"]) {\n text-align-last: auto !important;\n}\n\nspan.viv-anonymous-block {\n display: block;\n}\n\n[data-vivliostyle-page-container] {\n text-spacing-trim: space-all;\n text-autospace: no-autospace;\n}\nviv-ts-open.viv-ts-auto > viv-ts-inner,\nviv-ts-open.viv-ts-trim > viv-ts-inner {\n margin-inline-start: -0.5em;\n}\nviv-ts-close.viv-ts-auto > viv-ts-inner,\nviv-ts-close.viv-ts-trim > viv-ts-inner {\n letter-spacing: -0.5em;\n}\nviv-ts-close.viv-hang-end > viv-ts-inner,\nviv-ts-close.viv-hang-last > viv-ts-inner {\n letter-spacing: -1em;\n}\nviv-ts-open.viv-ts-auto::before,\nviv-ts-close.viv-ts-auto::after,\nviv-ts-close.viv-hang-end::after {\n content: \" \";\n font-family: Courier, monospace;\n word-spacing: normal;\n letter-spacing: -0.11em;\n line-height: 0;\n text-orientation: mixed;\n visibility: hidden;\n}\nviv-ts-close.viv-hang-end:not(.viv-hang-hw)::after {\n letter-spacing: 0.4em;\n}\nviv-ts-close.viv-hang-hw > viv-ts-inner {\n letter-spacing: -0.5em;\n}\nviv-ts-open.viv-hang-first > viv-ts-inner {\n display: inline-block;\n line-height: 1;\n inline-size: 1em;\n text-indent: 0;\n text-align: end;\n text-align-last: end;\n margin-inline-start: -1em;\n}\nviv-ts-thin-sp::after {\n content: \" \";\n font-family: Times, serif;\n word-spacing: normal;\n letter-spacing: -0.125em;\n line-height: 0;\n text-orientation: mixed;\n visibility: hidden;\n}\n[style*=text-decoration] :is(viv-ts-thin-sp, viv-ts-close.viv-ts-auto)::after {\n visibility: visible;\n}\n\nspan[data-viv-leader] {\n text-combine-upright: none;\n text-orientation: mixed;\n white-space: pre;\n}\n\n/* ::marker */\n/* Mozilla Bullet font (https://github.com/mozilla/gecko-dev/blob/master/layout/style/res/Mozilla_Bullet.woff2) */\n@font-face {\n font-family: \"-viv-moz-bullet\";\n src: url(\"data:font/woff2;base64,d09GMgABAAAAAAScAAsAAAAACfAAAARNAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAABmAAhBIRCAqGMIRJATYCJAMsCxgABCAFhF4HaBsuCMgehXEsLOlXaXd7sgbPQ172fjLwdhYFM92mABaiTuRVdO5/mx9I5UJiJom3phLRQw/TSF2M/vo25+pNyWkNws81NrUDAAf0QOdfcf7nmPEyBPZtCbbZEDuosskKZG922ZhBenh05qcSXktf6s3Oy9dAkWsyDzMoM5QTKcwKNjFayUPSREGFhUMrdE8MJsH052qGcYNO3pbEaYIBoDTItIKGAqhDdKHRD0kkKg6QGSCWEfueTNr3P6OvYaIbDH/8ULEAbjQtUt+hT/qmX/SH/twwMLDqN4jxzXjy4PHtltSA6lINqkpRd7N7onVBP20y7YBWyDIHFEBjqKBFMmECfQcTZtD3MmEB/SATVtCPM2ED/TQTdtCfS0/pEsN4ySin3r8q8xHE+0D0XMg8gJi4YrNpNv3qetXuDyeo6OBNZrq5gi7ouC1zcmB2Fd+FewIhcUIfszpF1hzXhrmMCwxaznRyZjig6Y2W7+bBn2DL8fJu/2oHbWc6X80+LUTXcVzv8O3IOy4qKVyFw/DHaMtfzNQEi5gbFT/EDpiofbpkYq2dQui6WcpfxrVBEJ/KxbLA4ZroZoVx+iE+QeTIiI7oKuoUIk/a1ekEOoNFjozm0suYYUelq13/88K1c3PTH9O9Q0d5LZbu7+J2aT7XP23KyQs+34WTU7r8d/k0l6dLl98Dn+/BSUZc7U0mm7FqhSMO9EHV/j5FB4qYX4aXNaKwz/4RRfAWsW8xGW+hvr8PTAf6IP9mRpkDwwv7QFz9HRuOeGWfd8rkyYsWTVy4vpG/pgVNWzBx0aTeIgeq58XFVfZXVduwuOq51a77aT0XLVw4v1PBFjRsQzO+tVeVp3KIwqfKbd6sdjzGvFSuPMquGpMT29lkrhwbE5uz6cGHhIETB06oUk+6tHLJgfnu/3nVnJzYxiXNjQNjYqsu+vCgYKDla5uUOzTNDZg46eCBd3d3gSk9Kz/bFiv8hvOzCT5eqyjBGerT+EiG/JGqwbC+UQ6Bv9bmKGWMj8Yn+fPVRJxKBGqTFXQyM9DhHSlvEHmLVxyYjY/Fdd3hACfLyP3VVZLvVR7B0pxSsGIBqHhwT5sSMOMkRG0BJhpsWMkEO24KwE0pqp3tIYTWCIjJjuBiGNTKTj8JoBLKAn4TmPFnj9oywZwFGx4egp1g3oObeLHdwUO2pFcYTITZCa2c1GQbNg6RCsu9bpikThhAWnLaBi3LM8+5VbMU6rUn30owOC83ULcfBlClb5BBre46BinaWRal85SUvlCbUx1Nbyj2HWCxBTkEgWScQKzsTioJW0IanAYRZqET4mZLSKU2JABII9np01lQ7lOt3srtM1KAeqgQPhYJSMCZJRuAukRZB1CF35gB1MJBr4ilIPZchNyIlDkpRt+3s96cz9K8XKQvCdZfcqWxgtLoXZ2AoKAyVSRRxSRmsYjVOriP089q3z6gdMjE5KI7kzumWzpnAwAAAA==\") format(\"woff2\");\n}\n[data-adapt-pseudo=\"marker\"] {\n unicode-bidi: isolate;\n font-variant-numeric: tabular-nums;\n white-space: pre;\n text-transform: none;\n}\n[data-adapt-pseudo=\"marker\"]._viv-marker-bullet {\n font-family: \"-viv-moz-bullet\";\n font-style: normal;\n font-weight: normal;\n}\n[data-adapt-pseudo=\"marker\"]._viv-marker-outside {\n position: absolute;\n text-indent: 0;\n}\n[data-adapt-pseudo=\"marker\"] > ._viv-marker-outside-content {\n position: absolute;\n inset-inline-end: 0;\n}\n";
36
+ export declare const UserAgentCounterStylesCss: string;
@@ -0,0 +1,146 @@
1
+ /**
2
+ * Copyright 2025 Vivliostyle Foundation
3
+ *
4
+ * Vivliostyle.js is free software: you can redistribute it and/or modify
5
+ * it under the terms of the GNU Affero General Public License as published by
6
+ * the Free Software Foundation, either version 3 of the License, or
7
+ * (at your option) any later version.
8
+ *
9
+ * Vivliostyle.js is distributed in the hope that it will be useful,
10
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
11
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
+ * GNU Affero General Public License for more details.
13
+ *
14
+ * You should have received a copy of the GNU Affero General Public License
15
+ * along with Vivliostyle.js. If not, see <http://www.gnu.org/licenses/>.
16
+ */
17
+ /**
18
+ * Not implemented:
19
+ *
20
+ * - Support using <image> in <symbol>
21
+ * https://drafts.csswg.org/css-counter-styles/#typedef-symbol
22
+ *
23
+ * - Make the disclosure-open/closed values respond to writing modes
24
+ * https://drafts.csswg.org/css-counter-styles/#disclosure-open
25
+ * CounterStyle.format may require the writing mode as an argument.
26
+ * It may be necessary to extend it so that the caller can obtain the writing mode.
27
+ *
28
+ * - Use grapheme clusters for character counting in CounterStyle.#applyPadding.
29
+ * https://drafts.csswg.org/css-counter-styles/#counter-style-pad
30
+ * Intl.Segmenter may be useful. CounterStyle.format may require the lang as an argument.
31
+ *
32
+ * - Implement symbols() for defining anonymous counter styles
33
+ * https://drafts.csswg.org/css-counter-styles/#symbols-function
34
+ * Extending CounterStyle.defineAnonymous( ... ) should work.
35
+ */
36
+ import * as Css from "./css";
37
+ import * as CssCascade from "./css-cascade";
38
+ type SetElement<T> = T extends ReadonlySet<infer U> ? U : never;
39
+ type Negative = Readonly<{
40
+ prefix: string;
41
+ suffix: string | null;
42
+ }>;
43
+ type RangeItem = Readonly<{
44
+ lower: number;
45
+ upper: number;
46
+ }>;
47
+ type Range = readonly [RangeItem, ...RangeItem[]];
48
+ type Pad = Readonly<{
49
+ minLength: number;
50
+ symbol: string;
51
+ }>;
52
+ type AdditiveSymbol = Readonly<{
53
+ weight: number;
54
+ symbol: string;
55
+ }>;
56
+ /**
57
+ * @see https://drafts.csswg.org/css-counter-styles/
58
+ */
59
+ export declare function validateDescriptorValue(name: string, value: Css.Val): boolean;
60
+ type CounterStyleStoreMap = Map<string, CounterStyle>;
61
+ declare abstract class CounterStyle {
62
+ #private;
63
+ protected readonly _store: CounterStyleStoreMap;
64
+ protected constructor(store: CounterStyleStoreMap, descriptors: CssCascade.ElementStyle);
65
+ static create(store: CounterStyleStoreMap, descriptors: CssCascade.ElementStyle): CounterStyle;
66
+ static createDecimal(store: CounterStyleStoreMap): CounterStyle;
67
+ static createDisc(store: CounterStyleStoreMap): CounterStyle;
68
+ static createSquare(store: CounterStyleStoreMap): CounterStyle;
69
+ static createCircle(store: CounterStyleStoreMap): CounterStyle;
70
+ static createDisclosureOpen(store: CounterStyleStoreMap): CounterStyle;
71
+ static createDisclosureClosed(store: CounterStyleStoreMap): CounterStyle;
72
+ static createNone(store: CounterStyleStoreMap): CounterStyle;
73
+ static get CHINESE_LONGHAND_NAMES(): typeof ChineseLonghand.NAMES;
74
+ static createChineseLonghand(store: CounterStyleStoreMap, name: SetElement<typeof ChineseLonghand.NAMES>): CounterStyle;
75
+ static createEthiopicNumeric(store: CounterStyleStoreMap): CounterStyle;
76
+ protected _getNegative(): Negative | null;
77
+ protected static _getNegativeFrom(style: CounterStyle): Negative | null;
78
+ protected _getPrefix(): string | null;
79
+ protected static _getPrefixFrom(style: CounterStyle): string | null;
80
+ protected _getSuffix(): string | null;
81
+ protected static _getSuffixFrom(style: CounterStyle): string | null;
82
+ protected abstract _getAutoRange(): Range;
83
+ protected static _getAutoRangeFrom(style: CounterStyle): Range;
84
+ protected _getRange(): Range | null;
85
+ protected static _getRangeFrom(style: CounterStyle): Range | null;
86
+ protected _getPad(): Pad | null;
87
+ protected static _getPadFrom(style: CounterStyle): Pad | null;
88
+ protected _getFallback(): CounterStyle | null;
89
+ protected static _getFallbackFrom(style: CounterStyle): CounterStyle | null;
90
+ protected _getSymbols(): readonly [string, ...string[]] | null;
91
+ protected static _getSymbolsFrom(style: CounterStyle): readonly [string, ...string[]] | null;
92
+ protected _getAdditiveSymbols(): readonly [AdditiveSymbol, ...AdditiveSymbol[]] | null;
93
+ protected static _getAdditiveSymbolsFrom(style: CounterStyle): readonly [AdditiveSymbol, ...AdditiveSymbol[]] | null;
94
+ /**
95
+ * @see https://drafts.csswg.org/css-counter-styles-3/#use-a-negative-sign
96
+ */
97
+ protected abstract _usesNegativeSign(value: number): boolean;
98
+ protected static _useNegativeSignFrom(style: CounterStyle, value: number): boolean;
99
+ /**
100
+ * @see https://drafts.csswg.org/css-counter-styles-3/#generate-a-counter
101
+ */
102
+ protected abstract _generateInitialRepresentation(value: number): string | null;
103
+ protected static _generateInitialRepresentationFrom(style: CounterStyle, value: number): string | null;
104
+ /**
105
+ * Format a counter value to its string representation.
106
+ * @see https://drafts.csswg.org/css-counter-styles-3/#generate-a-counter
107
+ */
108
+ format(value: number): string;
109
+ /**
110
+ * Format a counter value with prefix and suffix for use in ::marker.
111
+ * Unlike format(), this includes the prefix and suffix descriptors.
112
+ * @see https://drafts.csswg.org/css-counter-styles-3/#counter-style-prefix
113
+ * @see https://drafts.csswg.org/css-counter-styles-3/#counter-style-suffix
114
+ */
115
+ formatMarker(value: number): string;
116
+ }
117
+ declare const chineseLonghandNameList: readonly ["simp-chinese-informal", "simp-chinese-formal", "trad-chinese-informal", "trad-chinese-formal", "cjk-ideographic"];
118
+ /**
119
+ * @see https://drafts.csswg.org/css-counter-styles-3/#limited-chinese
120
+ */
121
+ declare class ChineseLonghand extends CounterStyle {
122
+ #private;
123
+ static readonly NAMES: ReadonlySet<(typeof chineseLonghandNameList)[number]>;
124
+ constructor(store: CounterStyleStoreMap, name: SetElement<typeof ChineseLonghand.NAMES>);
125
+ protected _getAutoRange(): Range;
126
+ protected _usesNegativeSign(value: number): boolean;
127
+ protected _generateInitialRepresentation(value: number): string | null;
128
+ }
129
+ export declare class CounterStyleStore {
130
+ #private;
131
+ constructor();
132
+ define(name: string, descriptors: CssCascade.ElementStyle): CounterStyle | null;
133
+ getStyle(name: string): CounterStyle | null;
134
+ /**
135
+ * Format a counter value using the specified counter style.
136
+ * @see https://drafts.csswg.org/css-counter-styles/
137
+ */
138
+ format(name: string, value: number): string;
139
+ /**
140
+ * Format a counter value with prefix and suffix for use in ::marker.
141
+ * Not yet in use, but will be used in the future. #732
142
+ * @see https://drafts.csswg.org/css-counter-styles/
143
+ */
144
+ formatMarker(name: string, value: number): string;
145
+ }
146
+ export {};
@@ -1,3 +1,4 @@
1
+ import * as CounterStyle from "./counter-style";
1
2
  import * as Css from "./css";
2
3
  import * as CssParser from "./css-parser";
3
4
  import * as CssTokenizer from "./css-tokenizer";
@@ -558,7 +559,7 @@ export interface CounterResolver {
558
559
  * Get value of the CSS target-text() function
559
560
  * https://drafts.csswg.org/css-content-3/#target-text
560
561
  * @param url Target URL (with fragment identifier)
561
- * @param pseudoElement Pseudo-element selector ('content', 'before', 'after', 'first-letter')
562
+ * @param pseudoElement Pseudo-element selector ('content', 'before', 'after', 'first-letter', 'marker')
562
563
  */
563
564
  getTargetTextVal(url: string, pseudoElement: string): Exprs.Val;
564
565
  /**
@@ -627,38 +628,6 @@ export declare class ContentPropVisitor extends Css.FilterVisitor {
627
628
  visitFunc(func: Css.Func): Css.Val;
628
629
  }
629
630
  export declare function roman(num: number): string;
630
- export declare const additiveNumbering: {
631
- roman: (string | number)[];
632
- armenian: (string | number)[];
633
- georgian: (string | number)[];
634
- hebrew: (string | number)[];
635
- };
636
- export declare const alphabeticNumbering: {
637
- latin: string;
638
- alpha: string;
639
- greek: string;
640
- russian: string;
641
- };
642
- export declare const fixed: {
643
- square: string;
644
- disc: string;
645
- circle: string;
646
- none: string;
647
- };
648
- export declare function additiveFormat(entries: any[], num: number): string;
649
- export declare function expandAlphabet(str: string): string[] | null;
650
- export declare function alphabeticFormat(alphabetStr: string, num: number): string;
651
- export type ChineseNumbering = {
652
- digits: string;
653
- markers: string;
654
- negative: string;
655
- formal: boolean;
656
- };
657
- /**
658
- * From http://www.w3.org/TR/css3-lists/
659
- */
660
- export declare const chineseTradInformal: ChineseNumbering;
661
- export declare function chineseCounter(num: number, numbering: ChineseNumbering): string;
662
631
  /**
663
632
  * Fitting order and specificity in the same number. Order is recorded in the
664
633
  * fractional part. Select value so that
@@ -682,13 +651,14 @@ export declare class Cascade {
682
651
  order: number;
683
652
  clone(): Cascade;
684
653
  insertInTable(table: ActionTable, key: string, action: CascadeAction): void;
685
- createInstance(context: Exprs.Context, counterListener: CounterListener, counterResolver: CounterResolver, lang: any): CascadeInstance;
654
+ createInstance(context: Exprs.Context, counterListener: CounterListener, counterResolver: CounterResolver, lang: any, counterStyleStore: CounterStyle.CounterStyleStore): CascadeInstance;
686
655
  nextOrder(): number;
687
656
  }
688
657
  export declare class CascadeInstance {
689
658
  readonly context: Exprs.Context;
690
659
  readonly counterListener: CounterListener;
691
660
  readonly counterResolver: CounterResolver;
661
+ readonly counterStyleStore: CounterStyle.CounterStyleStore;
692
662
  code: Cascade;
693
663
  stack: ConditionItem[][];
694
664
  conditions: {
@@ -745,7 +715,7 @@ export declare class CascadeInstance {
745
715
  };
746
716
  dependentConditions: string[];
747
717
  elementStack: Element[];
748
- constructor(cascade: Cascade, context: Exprs.Context, counterListener: CounterListener, counterResolver: CounterResolver, lang: string);
718
+ constructor(cascade: Cascade, context: Exprs.Context, counterListener: CounterListener, counterResolver: CounterResolver, lang: string, counterStyleStore: CounterStyle.CounterStyleStore);
749
719
  pushConditionItem(item: ConditionItem): void;
750
720
  increment(condition: string, viewCondition: Matchers.Matcher): void;
751
721
  decrement(condition: string, viewCondition: Matchers.Matcher): void;
@@ -767,6 +737,15 @@ export declare class CascadeInstance {
767
737
  setRunningElement(props: ElementStyle): void;
768
738
  processPseudoelementProps(pseudoprops: ElementStyle, element: Element): void;
769
739
  pushElement(styler: CssStyler.AbstractStyler, element: Element, baseStyle: ElementStyle, elementOffset: number): void;
740
+ processMarkerPseudoelementProps(pseudoProps: ElementStyle, element: Element, styler: CssStyler.AbstractStyler): void;
741
+ /**
742
+ * Get inherited property value
743
+ * @param propName
744
+ * @param styler
745
+ * @param element
746
+ * @returns the inherited property value, or the initial value (or null) if not found
747
+ */
748
+ getInheritedPropertyValue(propName: string, styler: CssStyler.AbstractStyler, element: Element): Css.Val | null;
770
749
  private applyAttrFilterInner;
771
750
  private applyAttrFilter;
772
751
  /**
@@ -60,6 +60,7 @@ export declare class ParserHandler implements CssTokenizer.TokenizerHandler {
60
60
  nextSelector(): void;
61
61
  startSelectorRule(): void;
62
62
  startFontFaceRule(): void;
63
+ startCounterStyleRule(name: string): void;
63
64
  startFootnoteRule(pseudoelem: string | null): void;
64
65
  startViewportRule(): void;
65
66
  startDefineRule(): void;
@@ -120,6 +121,7 @@ export declare class DispatchParserHandler extends ParserHandler {
120
121
  nextSelector(): void;
121
122
  startSelectorRule(): void;
122
123
  startFontFaceRule(): void;
124
+ startCounterStyleRule(name: string): void;
123
125
  startFootnoteRule(pseudoelem: string | null): void;
124
126
  startViewportRule(): void;
125
127
  startDefineRule(): void;
@@ -155,6 +157,7 @@ export declare class SlaveParserHandler extends SkippingParserHandler {
155
157
  reportAndSkip(message: string): void;
156
158
  startSelectorRule(): void;
157
159
  startFontFaceRule(): void;
160
+ startCounterStyleRule(name: string): void;
158
161
  startFootnoteRule(pseudoelem: string | null): void;
159
162
  startViewportRule(): void;
160
163
  startDefineRule(): void;
@@ -1,3 +1,4 @@
1
+ import * as CounterStyle from "./counter-style";
1
2
  import * as Css from "./css";
2
3
  import * as CssCascade from "./css-cascade";
3
4
  import * as CssValidator from "./css-validator";
@@ -170,7 +171,7 @@ export declare class Styler implements AbstractStyler {
170
171
  bodyReached: boolean;
171
172
  constructor(xmldoc: XmlDoc.XMLDocHolder, cascade: CssCascade.Cascade, scope: Exprs.LexicalScope, context: Exprs.Context, primaryFlows: {
172
173
  [key: string]: boolean;
173
- }, validatorSet: CssValidator.ValidatorSet, counterListener: CssCascade.CounterListener, counterResolver: CssCascade.CounterResolver);
174
+ }, validatorSet: CssValidator.ValidatorSet, counterListener: CssCascade.CounterListener, counterResolver: CssCascade.CounterResolver, counterStyleStore: CounterStyle.CounterStyleStore);
174
175
  hasProp(style: CssCascade.ElementStyle, map: CssValidator.ValueMap, name: string): boolean;
175
176
  transferPropsToRoot(srcStyle: CssCascade.ElementStyle, map: CssValidator.ValueMap): void;
176
177
  /**
@@ -205,6 +206,6 @@ export declare class Styler implements AbstractStyler {
205
206
  /** @override */
206
207
  processContent(element: Element, styles: {
207
208
  [key: string]: Css.Val;
208
- }, viewNode: Node): void;
209
+ }, nodeContext: Vtree.NodeContext): void;
209
210
  }
210
211
  export declare const columnProps: string[];
@@ -1,24 +1,3 @@
1
- /**
2
- * Copyright 2013 Google, Inc.
3
- * Copyright 2015 Daishinsha Inc.
4
- * Copyright 2019 Vivliostyle Foundation
5
- *
6
- * Vivliostyle.js is free software: you can redistribute it and/or modify
7
- * it under the terms of the GNU Affero General Public License as published by
8
- * the Free Software Foundation, either version 3 of the License, or
9
- * (at your option) any later version.
10
- *
11
- * Vivliostyle.js is distributed in the hope that it will be useful,
12
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
- * GNU Affero General Public License for more details.
15
- *
16
- * You should have received a copy of the GNU Affero General Public License
17
- * along with Vivliostyle.js. If not, see <http://www.gnu.org/licenses/>.
18
- *
19
- * @fileoverview CssValidator - Parse validation rules (validation.txt), validate
20
- * properties and shorthands.
21
- */
22
1
  import * as Css from "./css";
23
2
  export interface PropertyReceiver {
24
3
  unknownProperty(name: string, value: Css.Val): void;
@@ -49,13 +49,17 @@ export declare function getComputedDisplayValue(display: Css.Ident, position: Cs
49
49
  * Judges if the generated box is block.
50
50
  */
51
51
  export declare function isBlock(display: Css.Ident, position: Css.Ident, float: Css.Val, isRoot: boolean): boolean;
52
- export declare function isInlineLevel(display: Css.Ident | string): boolean;
53
- export declare function isBlockLevel(display: Css.Ident | string): boolean;
54
- export declare function isRubyInternalDisplay(display: Css.Ident | string): boolean;
52
+ export declare function isInlineLevel(display: Css.Val | string | undefined): boolean;
53
+ /**
54
+ * Check if the display value includes "list-item", like "inline list-item".
55
+ */
56
+ export declare function isListItem(display: Css.Val | string | undefined): boolean;
57
+ export declare function isBlockLevel(display: Css.Val | string | undefined): boolean;
58
+ export declare function isRubyInternalDisplay(display: Css.Val | string | undefined): boolean;
55
59
  /**
56
60
  * Judges if the generated box establishes a new block formatting context.
57
61
  */
58
- export declare function establishesBFC(display: Css.Ident, position: Css.Ident, float: Css.Val, overflow: Css.Ident, writingMode?: Css.Ident, parentWritingMode?: Css.Ident, isFlowRoot?: boolean): boolean;
62
+ export declare function establishesBFC(display: Css.Val, position: Css.Ident, float: Css.Val, overflow: Css.Ident, writingMode?: Css.Ident, parentWritingMode?: Css.Ident, isFlowRoot?: boolean): boolean;
59
63
  /**
60
64
  * Judges if the generated box establishes a containing block for descendant
61
65
  * boxes with 'position: absolute'.
@@ -24,6 +24,7 @@ import "./table";
24
24
  import * as Base from "./base";
25
25
  import * as Constants from "./constants";
26
26
  import * as Counters from "./counters";
27
+ import * as CounterStyle from "./counter-style";
27
28
  import * as Css from "./css";
28
29
  import * as CssCascade from "./css-cascade";
29
30
  import * as CssParser from "./css-parser";
@@ -63,13 +64,14 @@ export declare class Style {
63
64
  readonly pageProps: {
64
65
  [key: string]: CssCascade.ElementStyle;
65
66
  };
67
+ readonly counterStyleStore: CounterStyle.CounterStyleStore;
66
68
  fontDeobfuscator: ((p1: string) => ((p1: Blob) => Task.Result<Blob>) | null) | null;
67
69
  validatorSet: CssValidator.ValidatorSet;
68
70
  constructor(store: OPSDocStore, rootScope: Exprs.LexicalScope, pageScope: Exprs.LexicalScope, cascade: CssCascade.Cascade, rootBox: PageMaster.RootPageBox, fontFaces: FontFace[], footnoteProps: CssCascade.ElementStyle, flowProps: {
69
71
  [key: string]: CssCascade.ElementStyle;
70
72
  }, viewportProps: CssCascade.ElementStyle[], pageProps: {
71
73
  [key: string]: CssCascade.ElementStyle;
72
- });
74
+ }, counterStyleStore: CounterStyle.CounterStyleStore);
73
75
  sizeViewport(viewportWidth: number, viewportHeight: number, fontSize: number, pref?: Exprs.Preferences): {
74
76
  width: number;
75
77
  height: number;
@@ -190,6 +192,7 @@ export declare class BaseParserHandler extends CssCascade.CascadeParserHandler {
190
192
  startWhenRule(expr: Css.Expr): void;
191
193
  startDefineRule(): void;
192
194
  startFontFaceRule(): void;
195
+ startCounterStyleRule(name: string): void;
193
196
  startFlowRule(flowName: string): void;
194
197
  startViewportRule(): void;
195
198
  startFootnoteRule(pseudoelem: string | null): void;
@@ -205,6 +208,7 @@ export declare class StyleParserHandler extends CssParser.DispatchParserHandler
205
208
  cascadeParserHandler: BaseParserHandler;
206
209
  regionCount: number;
207
210
  fontFaces: FontFace[];
211
+ counterStyles: CounterStyle.CounterStyleStore;
208
212
  footnoteProps: CssCascade.ElementStyle;
209
213
  flowProps: {
210
214
  [key: string]: CssCascade.ElementStyle;
@@ -136,7 +136,7 @@ export type ConfigurationHook = (p1: Base.JSON) => {
136
136
  needRefresh: boolean | null | undefined;
137
137
  };
138
138
  export type ResolveTextNodeBreakerHook = (p1: Vtree.NodeContext) => Layout.TextNodeBreaker;
139
- export type ResolveFormattingContextHook = (p1: Vtree.NodeContext, p2: boolean, p3: Css.Ident, p4: Css.Ident, p5: Css.Val, p6: boolean) => Vtree.FormattingContext;
139
+ export type ResolveFormattingContextHook = (p1: Vtree.NodeContext, p2: boolean, p3: Css.Val, p4: Css.Ident, p5: Css.Val, p6: boolean) => Vtree.FormattingContext;
140
140
  export type ResolveLayoutProcessorHook = (p1: Vtree.FormattingContext) => LayoutProcessor.LayoutProcessor;
141
141
  export type PostLayoutBlockHook = (p1: Vtree.NodeContext, p2: Vtree.NodeContext[], p3: Layout.Column) => void;
142
142
  /**
@@ -28,5 +28,9 @@ export declare class PseudoelementStyler implements PseudoElement.PseudoelementS
28
28
  /** @override */
29
29
  processContent(element: Element, styles: {
30
30
  [key: string]: Css.Val;
31
- }, viewNode: Node): void;
31
+ }, nodeContext: Vtree.NodeContext): void;
32
+ /**
33
+ * ::marker support
34
+ */
35
+ private processMarker;
32
36
  }
@@ -35,7 +35,7 @@ export declare namespace CssStyler {
35
35
  getStyle(element: Element, deep: boolean): CssCascade.ElementStyle;
36
36
  processContent(element: Element, styles: {
37
37
  [key: string]: Css.Val;
38
- }, viewNode: Node): any;
38
+ }, nodeContext: Vtree.NodeContext): any;
39
39
  }
40
40
  }
41
41
  export declare namespace Layout {
@@ -652,6 +652,11 @@ export declare namespace Vtree {
652
652
  * browser.
653
653
  */
654
654
  interface ClientLayout {
655
+ layoutBox: Element;
656
+ window: Window;
657
+ pixelRatio: number;
658
+ scaleRatio: number;
659
+ layoutUnitPerPixel: number;
655
660
  getRangeClientRects(range: Range): ClientRect[];
656
661
  getElementClientRect(element: Element): ClientRect;
657
662
  /**