Lynx

-x-auto-font-size-line-ranges

Introduction

The -x-auto-font-size-line-ranges property defines line-count-based font size ranges for text auto sizing. Use it together with -x-auto-font-size: true to provide different font size search ranges for different rendered line counts.

Examples

Syntax

-x-auto-font-size: true;
-x-auto-font-size-line-ranges:
  line-range(1, 18px, 22px), line-range(2, 16px, 18px),
  line-range(3 to infinity, 14px);

Values

  • line-range(<line-count>, <min-size>[, <max-size>])
    • Defines one line-count rule.
    • <line-count> can be an exact positive integer such as 1 or an open-ended range such as 3 to infinity.
    • <min-size> is required and must be a <length>.
    • <max-size> is optional and must be a <length>. If omitted, the value defaults to <min-size>, meaning a fixed font size is used for the matched rule.

Formal definition

Initial value[]
Applies totext
Inheritedno
Animatableno

Formal syntax

-x-auto-font-size-line-ranges = <line-range-function>#

<line-range-function> = line-range( <line-count> , <length> [, <length>]? )
<line-count> = <integer> | <integer> to infinity

Differences from Web

  • This is a Lynx-specific property.

Notes

  • This property is only effective when -x-auto-font-size is enabled.
  • This property overrides the minimum and maximum font size settings in -x-auto-font-size.
  • When this property is set, -x-auto-font-size-preset-sizes does not take effect.

Compatibility

LCD tables only load in the browser

Except as otherwise noted, this work is licensed under a Creative Commons Attribution 4.0 International License, and code samples are licensed under the Apache License 2.0.