English | 日本語
Supported CSS Features

Supported CSS Features

Vivliostyle currently supports the following CSS values, selectors, at-rules, media queries, and properties:

In addition, essentially all CSS properties and values supported by the browser are available, since Vivliostyle.js lets the browser handle CSS properties that Vivliostyle.js does not handle on its own.

Values

Selectors

CSS 2

Not supported selectors

Selectors 3

Selectors 4

CSS Overflow 4

CSS Pseudo-Elements 4

Not supported selectors

At-rules

CSS 2

CSS Namespaces 3

CSS Conditional Rules 3

CSS Conditional Rules 4

CSS Paged Media 3

See also: Properties in CSS Paged Media 3

CSS Generated Content for Paged Media (GCPM) 3

See also:

CSS Fonts 3

See also: Properties in CSS Fonts 3

CSS Counter Styles 3

Media queries

Properties

CSS 2

CSS Paged Media 3

  • bleed
    • Only effective when specified within an @page rule without page selectors
  • marks
    • Only effective when specified within an @page rule without page selectors
  • size
    • Supports all required values and proposed values A0-A10, B0-B10, C0-C10 and JIS-B0-JIS-B10. See [Pull Request]
  • crop-offset
    • Specifies distance between the edge of the trim size and the edge of the output page media size
    • This property is not standardized yet. See [Issue]
  • crop-marks-line-color
    • Specifies color of the crop marks
    • This property is not standardized yet. See [Pull Request]
  • page (Named Pages)

See also: At-rules in CSS Paged Media 3

CSS Generated Content for Paged Media (GCPM) 3

See also:

CSS Fragmentation 3

CSS Fragmentation 4

CSS Page Floats

  • clear
    • Supports none, inline-start, inline-end, block-start, block-end, left, right, top, bottom, both, all, same values.
    • When all is specified on a block-level box (not a page float), the block-start edge of the box gets pushed down so that the edge comes after any block-start/block-end page float of which anchors are before the box in the document order.
    • When a clear value is specified on a page float, it is placed so that it comes after any of preceding page floats.
    • same value means the same direction as one which the page float is floated to.
    • If a page float with float: snap-block would be placed at the block-start end but a clear value on it forbidden such placement, the float is instead placed at the block-end side (unless the clear value also forbidden such placement).
    • The page, column, and region values ensure that preceding page floats are placed before the page/column/region containing the element that has the clear property, which can be a page float, a normal float, or a block-level box.
  • float
    • Supports block-start, block-end, inline-start, inline-end, snap-block, left, right, top, bottom and none values.
    • Supports values combining keywords. For example,
      • float: top right; float to top right corner
      • float: bottom left; float to bottom left corner
      • float: top bottom; float to top or bottom edge
      • float: top bottom left; float to top left or bottom left corner
      • float: top bottom left right; float to top left, top right, bottom left, or bottom right corner
      • float: block-start inline-start; float to block-start and inline-start corner
      • float: block-start block-end; float to block-start or block-end edge (same as 'snap-block')
      • See [Pull Request]
  • float-reference
    • Specify float-reference: page (or column/region) to enable page (or column/region) float.
  • float-min-wrap-block
    • Applies to a page float
    • A percentage value is respect to the block dimension of the float reference of the page float
    • When set to a positive length, in-flow contents are not allowed to be flown into a space next to the page float if the block extent of the space is less than the specified length. In that case, the space is kept empty and the in-flow contents are deferred to the next column.
    • This property is not standardized yet. See [Pull Request]

CSS Color 3

See also: Values - Supported color values

CSS Backgrounds and Borders 3

CSS Images 3

  • object-fit
  • object-position
  • image-resolution
    • Only <resolution> value is supported.
    • Only supported for content of img, input[type=image] and video (applied to poster images) elements and before/after pseudoelements. Other images such as background images, list images or border images are not supported.
    • The property is applied to vector images such as SVG, as well as raster images. This behavior is different from what the spec specifies.

CSS Fonts 3

See also: At-rules in CSS Fonts 3

CSS Text 3

CSS Text 4

  • text-autospace
    • Supported values: normal | no-autospace | [ ideograph-alpha || ideograph-numeric ] | auto
  • text-spacing-trim
    • Values: space-all | normal | space-first | trim-start | trim-both | auto
  • text-spacing
    • Values: normal | none | auto | [<autospace> || <spacing-trim>]
    • Note: This is a shorthand property that sets the text-autospace and text-spacing-trim properties. See [Pull Request]

CSS Text Decoration 3

CSS Inline Layout 3

CSS Multi-column 1

Note: Currently the multi-column layout works well only when specified on the root or body element. [Issue]

CSS Basic User Interface 3

CSS Writing Modes 3

CSS Flexible Box 1

CSS Transforms 1

Compositing and Blending 1

Scalable Vector Graphics (SVG) 2

Scalable Vector Graphics (SVG) 1.1

CSS Masking 1

Filter Effects 1

Pointer Events

CSS Logical Properties and Values 1

Page spread inside/outside properties and values

In these properties and values, the inside and outside keywords resolve to left and right depending on whether the page is left or right page.

Note: These CSS properties and values are not standardized yet. See [Pull Request]

Added *-inside/outside properties:

  • margin-inside, margin-outside
  • padding-inside, padding-outside
  • border-inside, border-outside
  • border-inside-color, border-outside-color
  • border-inside-style, border-outside-style
  • border-inside-width, border-outside-width
  • inset-inside, inset-outside

Extended properties with inside and outside values:

  • float, clear
  • text-align, text-align-last

CSS Repeated Headers and Footers

Note: This spec proposal is not submitted to CSS Working Group yet.

EPUB Adaptive Layout

Note: This spec is not on a W3C standards track. Future version of Vivliostyle may drop support for this spec.

At-rules

Properties