﻿<?xml version="1.0" encoding="utf-8"?>
<!--
CSS Box Alignment Module Level 3
W3C Working Draft, 6 December 2018
https://www.w3.org/TR/2018/WD-css-align-3-20181206/
-->
<definitions xmlns="urn:schemas-jetbrains-com:css-xml">
  <named-value id="self-position" declared-in="3.0" url="https://www.w3.org/TR/css-align-3/#typedef-self-position">
    <group type="or">
      <name value="center" tooltip="Centers the alignment subject within its alignment container."/>
      <name value="start" tooltip="Aligns the alignment subject to be flush with the alignment container’s start edge."/>
      <name value="end" tooltip="Aligns the alignment subject to be flush with the alignment container’s end edge."/>
      <name value="self-start"
            tooltip="Aligns the alignment subject to be flush with the edge of the alignment container corresponding to the alignment subject’s start side."/>
      <name value="self-end"
            tooltip="Aligns the alignment subject to be flush with the edge of the alignment container corresponding to the alignment subject’s end side."/>
      <name value="flex-start"
            tooltip="Only used in flex layout. Aligns the alignment subject to be flush with the edge of the alignment container corresponding to the flex container’s main-start or cross-start side, as appropriate. When used in layout modes other than Flexbox, this value computes to start."/>
      <name value="flex-end"
            tooltip="Only used in flex layout. Aligns the alignment subject to be flush with the edge of the alignment container corresponding to the flex container’s main-end or cross-end side, as appropriate. When used in layout modes other than Flexbox, this value computes to end."/>
    </group>
  </named-value>

  <named-value id="content-position" declared-in="3.0" url="https://www.w3.org/TR/css-align-3/#typedef-content-position">
    <group type="or">
      <name value="center" tooltip="Centers the alignment subject within its alignment container."/>
      <name value="start" tooltip="Aligns the alignment subject to be flush with the alignment container’s start edge."/>
      <name value="end" tooltip="Aligns the alignment subject to be flush with the alignment container’s end edge."/>
      <name value="flex-start"
            tooltip="Only used in flex layout. Aligns the alignment subject to be flush with the edge of the alignment container corresponding to the flex container’s main-start or cross-start side, as appropriate. When used in layout modes other than Flexbox, this value computes to start."/>
      <name value="flex-end"
            tooltip="Only used in flex layout. Aligns the alignment subject to be flush with the edge of the alignment container corresponding to the flex container’s main-end or cross-end side, as appropriate. When used in layout modes other than Flexbox, this value computes to end."/>
    </group>
  </named-value>

  <named-value id="baseline-position" declared-in="3.0" url="https://www.w3.org/TR/css-align-3/#typedef-baseline-position">
    <group type="or">
      <group>
        <group type="or" min="0">
          <name value="first"/>
          <name value="last"/>
        </group>
        <name value="baseline"/>
      </group>
    </group>
  </named-value>

  <named-value id="content-distribution" declared-in="3.0" url="https://www.w3.org/TR/css-align-3/#typedef-content-distribution">
    <group type="or">
      <name value="space-between"
            tooltip="The alignment subjects are evenly distributed in the alignment container. The first alignment subject is placed flush with the start edge of the alignment container, the last alignment subject is placed flush with the end edge of the alignment container, and the remaining alignment subjects are distributed so that the spacing between any two adjacent alignment subjects is the same. The default fallback alignment for this value is flex-start. (For layout modes other than flex layout, flex-start is identical to start.)"/>
      <name value="space-around"
            tooltip="The alignment subjects are evenly distributed in the alignment container, with a half-size space on either end. The alignment subjects are distributed so that the spacing between any two adjacent alignment subjects is the same, and the spacing before the first and after the last alignment subject is half the size of the other spacing. The default fallback alignment for this value is center."/>
      <name value="space-evenly"
            tooltip="The alignment subjects are evenly distributed in the alignment container, with a full-size space on either end. The alignment subjects are distributed so that the spacing between any two adjacent alignment subjects, before the first alignment subject, and after the last alignment subject is the same. The default fallback alignment for this value is center."/>
      <name value="stretch"
            tooltip="If the combined size of the alignment subjects is less than the size of the alignment container, any auto-sized alignment subjects have their size increased equally (not proportionally), while still respecting the constraints imposed by max-height/max-width (or equivalent functionality), so that the combined size exactly fills the alignment container. The default fallback alignment for this value is flex-start. (For layout modes other than flex layout, flex-start is identical to start.)"/>
    </group>
  </named-value>

  <named-value id="overflow-position" declared-in="3.0" url="https://www.w3.org/TR/css-align-3/#typedef-overflow-position">
    <group type="or">
      <name value="unsafe"
            tooltip="Regardless of the relative sizes of the alignment subject and alignment container, the given alignment value is honored."/>
      <name value="safe"
            tooltip="If the size of the alignment subject overflows the alignment container, the alignment subject is instead aligned as if the alignment mode were start."/>
    </group>
  </named-value>

  <property id="align-content" declared-in="3.0" url="https://www.w3.org/TR/css-align-3/#propdef-align-content"
            applies="block containers, multicol containers, flex containers, and grid containers" initial="normal" inherited="no"
            percentage="n/a">
    <group type="or">
      <name value="normal"
            tooltip="The normal represents a used value of 1em on multi-column containers, and a used value of 0px in all other contexts."/>
      <inline id="baseline-position"
              tooltip="Indicates baseline self-alignment, as defined in §4.2 Baseline Alignment: the baseline keyword and first/last modifiers, §6.4 Baseline Self-Alignment, and §9 Baseline Alignment Details."/>
      <inline id="content-distribution"/>
      <group>
        <inline id="overflow-position" min="0"/>
        <inline id="content-position"
                tooltip="This set is used by justify-content and align-content to align the box’s contents within itself. &lt;content-position&gt; = center | start | end | flex-start | flex-end"/>
      </group>
      <inline id="wide-keywords" inline="yes"/>
    </group>
  </property>

  <property id="align-items" declared-in="3.0" url="https://www.w3.org/TR/css-align-3/#propdef-align-items" applies="all elements"
            initial="normal" inherited="no" percentage="n/a">
    <description><![CDATA[<p>This property specifies the default
 <see cref="P:align-self" /> for all of the child boxes (including anonymous boxes) participating in this box’s formatting context.</p>]]></description>
    <group type="or">
      <name value="normal"/>
      <name value="stretch"/>
      <inline id="baseline-position"/>
      <group>
        <inline id="overflow-position" min="0"/>
        <inline id="self-position"/>
      </group>
      <inline id="wide-keywords" inline="yes"/>
    </group>
  </property>

  <property id="align-self" declared-in="3.0" url="https://www.w3.org/TR/css-align-3/#propdef-align-self"
            applies="flex items, grid items, and absolutely-positioned boxes" initial="auto" inherited="no" percentage="n/a">
    <description>
      <![CDATA[<p>Aligns the box (as the alignment subject) within its containing block (as the alignment container) along the block/column/cross axis of the alignment container: the box’s outer edges are aligned within its alignment container as described by its alignment value. Values have the following meanings:</p>]]></description>
    <group type="or">
      <name value="auto"
            tooltip="Behaves as normal if the box has no parent, or when determining the actual position of an absolutely positioned box. It behaves as the computed align-items value of the parent box (minus any legacy keywords) otherwise (including when determining the static position of an absolutely positioned box)."/>
      <name value="normal" tooltip="Represents the “default” alignment for the layout mode, as defined below."/>
      <name value="stretch" tooltip="As defined for justify-self in §6.1 Inline/Main-Axis Alignment: the justify-self property."/>
      <inline id="baseline-position"
              tooltip="Indicates baseline self-alignment, as defined in §4.2 Baseline Alignment: the baseline keyword and first/last modifiers, §6.4 Baseline Self-Alignment, and §9 Baseline Alignment Details."/>
      <group tooltip="Defined in §4 Alignment Keywords, above.">
        <inline id="overflow-position" min="0"/>
        <inline id="self-position"/>
      </group>
      <inline id="wide-keywords" inline="yes"/>
    </group>
  </property>

  <property id="column-gap" declared-in="3.0" url="https://www.w3.org/TR/css-align-3/#propdef-column-gap"
            applies="multi-column containers, flex containers, grid containers" initial="normal" inherited="no"
            percentage="refer to corresponding dimension of the content area">
    <description><![CDATA[<p>These properties specify fixed-length <strong>gutters</strong> between items in the container, adding space between them—<wbr>in a manner to the space-between keyword of the content-distribution properties, but of a fixed size instead of as a fraction of remaining space. The column-gap property specifies spacing between “columns”, separating boxes in the container’s inline axis similar to inline-axis margin; while
 <see cref="P:row-gap" /> indicates spacing between “rows”, separating boxes in the container’s block axis.</p>]]></description>
    <group type="or">
      <name value="normal"
            tooltip="The normal represents a used value of 1em on multi-column containers, and a used value of 0px in all other contexts."/>
      <inline id="length-percentage"
              tooltip="Specifies a gap between “rows” or “columns”, as defined by the layout modes to which it applies; see subsections below for details. Negative values are invalid. As in the min size properties and margins/paddings [CSS-SIZING-3], percentages resolve against zero for determining intrinsic size contributions, but resolve against the box’s content box when laying out the box’s contents."/>
      <inline id="wide-keywords" inline="yes"/>
    </group>
  </property>
  <prefixed-property id="column-gap" prefix="moz" url="https://developer.mozilla.org/en-US/docs/Web/CSS/column-gap" browsers="FF1.5"/>
  <prefixed-property id="column-gap" prefix="webkit" url="https://developer.mozilla.org/en-US/docs/Web/CSS/column-gap"
                     browsers="C1.0,S3.0"/>

  <property id="gap" declared-in="3.0" url="https://www.w3.org/TR/css-align-3/#propdef-gap"
            applies="multi-column containers, flex containers, grid containers" initial="see individual properties" inherited="no"
            percentage="refer to corresponding dimension of the content area">
    <description><![CDATA[<p>This property is a shorthand that sets
 <see cref="P:row-gap" /> and
 <see cref="P:column-gap" /> in one declaration. If &lt;‘column-gap’&gt; is omitted, it’s set to the same value as &lt;‘row-gap’&gt;.</p>]]></description>
    <group type="or">
      <group>
        <property id="row-gap"/>
        <property id="column-gap" min="0"/>
      </group>
      <inline id="wide-keywords" inline="yes"/>
    </group>
  </property>

  <property id="justify-content" declared-in="3.0" url="https://www.w3.org/TR/css-align-3/#propdef-justify-content"
            applies="multicol containers, flex containers, and grid containers" initial="normal" inherited="no" percentage="n/a">
    <description><![CDATA[<p>Aligns the contents of the box as a whole (as the alignment subject) within the box itself (as the alignment container): along the inline/row/main axis of the box (for justify-content) or the block/column/cross axis of the box (for
 <see cref="P:align-content" />). Values other than <strong>normal</strong> are defined in §4 Alignment Keywords, above.</p>]]></description>
    <group type="or">
      <name value="normal"/>
      <inline id="content-distribution"/>
      <group>
        <inline id="overflow-position" min="0"/>
        <group type="or">
          <inline id="content-position"/>
          <name value="left"/>
          <name value="right"/>
        </group>
      </group>
      <inline id="wide-keywords" inline="yes"/>
    </group>
  </property>

  <property id="justify-items" declared-in="3.0" url="https://www.w3.org/TR/css-align-3/#propdef-justify-items" applies="all elements"
            initial="legacy" inherited="no" percentage="n/a">
    <description><![CDATA[<p>This property specifies the default
 <see cref="P:justify-self" /> for all of the child boxes (including anonymous boxes) participating in this box’s formatting context. Values have the following meanings:</p>]]></description>
    <group type="or">
      <name value="auto"/> <!-- Not in w3 spec but is there in mozilla spec -->
      <name value="normal"/>
      <name value="stretch"/>
      <inline id="baseline-position"/>
      <group>
        <inline id="overflow-position" min="0"/>
        <group type="or">
          <inline id="self-position"/>
          <name value="left"/>
          <name value="right"/>
        </group>
      </group>
      <name value="legacy"
            tooltip="This keyword causes the value to effectively inherit into descendants. If the legacy keyword appears on its own (without an accompanying left, right, or center keyword): if the inherited value of justify-items includes the legacy keyword, this value computes to the inherited value; otherwise it computes to normal. When justify-self:auto references the value of justify-items, only the alignment keyword, not the legacy keyword, is referenced by it. It exists to implement the legacy alignment behavior of HTML’s &lt;center&gt; element and align attribute."/>
      <group type="and">
        <name value="legacy"
              tooltip="This keyword causes the value to effectively inherit into descendants. If the legacy keyword appears on its own (without an accompanying left, right, or center keyword): if the inherited value of justify-items includes the legacy keyword, this value computes to the inherited value; otherwise it computes to normal. When justify-self:auto references the value of justify-items, only the alignment keyword, not the legacy keyword, is referenced by it. It exists to implement the legacy alignment behavior of HTML’s &lt;center&gt; element and align attribute."/>
        <group type="or">
          <name value="left"/>
          <name value="right"/>
          <name value="center"/>
        </group>
      </group>
      <inline id="wide-keywords" inline="yes"/>
    </group>
  </property>

  <property id="justify-self" declared-in="3.0" url="https://www.w3.org/TR/css-align-3/#propdef-justify-self"
            applies="block-level boxes, absolutely-positioned boxes, and grid items" initial="auto" inherited="no" percentage="n/a">
    <description>
      <![CDATA[<p>Justifies the box (as the alignment subject) within its containing block (as the alignment container) along the inline/row/main axis of the alignment container: the box’s outer edges are aligned within its alignment container as described by its alignment value. Values have the following meanings:</p>]]></description>
    <group type="or">
      <name value="auto"
            tooltip="Behaves as normal if the box has no parent, or when determining the actual position of an absolutely positioned box. It behaves as the computed justify-items value of the parent box (minus any legacy keywords) otherwise (including when determining the static position of an absolutely positioned box)."/>
      <name value="normal"
            tooltip="Represents the “default” alignment for the layout mode. Its behavior depends on the layout mode, as described below."/>
      <name value="stretch"
            tooltip="When the box’s computed width/height (as appropriate to the axis) is auto and neither of its margins (in the appropriate axis) are auto, sets the box’s used size to the length necessary to make its outer size as close to filling the alignment container as possible while still respecting the constraints imposed by min-height/min-width/max-height/max-width. Unless otherwise specified, this value falls back to flex-start generally, and to self-start or self-end if the box has also specified first baseline or last baseline baseline content-alignment (respectively) in the same axis. Note: The stretch keyword can cause elements to shrink, to fit their container."/>
      <inline id="baseline-position"
              tooltip="Indicates baseline self-alignment, as defined in §4.2 Baseline Alignment: the baseline keyword and first/last modifiers, §6.4 Baseline Self-Alignment, and §9 Baseline Alignment Details."/>
      <group>
        <inline id="overflow-position" min="0"/>
        <group type="or">
          <inline id="self-position"/>
          <name value="left"/>
          <name value="right"/>
        </group>
      </group>
      <inline id="wide-keywords" inline="yes"/>
    </group>
  </property>

  <property id="place-content" declared-in="3.0" url="https://www.w3.org/TR/css-align-3/#propdef-place-content"
            applies="block containers, flex containers, and grid containers" initial="normal" inherited="no" percentage="n/a">
    <description><![CDATA[<p>This shorthand property sets both the
 <see cref="P:align-content" /> and
 <see cref="P:justify-content" /> properties in one declaration. The first value is assigned to
 <see cref="P:align-content" />. The second value is assigned to
 <see cref="P:justify-content" />; if omitted, it is copied from the first value, unless that value is a &lt;baseline-position&gt; in which case it is defaulted to start.</p>]]></description>
    <group type="or">
      <group>
        <property id="align-content"/>
        <property id="justify-content" min="0"/>
      </group>
      <inline id="wide-keywords" inline="yes"/>
    </group>
  </property>

  <property id="place-items" declared-in="3.0" url="https://www.w3.org/TR/css-align-3/#propdef-place-items" applies="all elements"
            initial="see individual properties" inherited="no" percentage="n/a">
    <description><![CDATA[<p>This shorthand property sets both the
 <see cref="P:align-items" /> and
 <see cref="P:justify-items" /> properties in a single declaration. The first value is assigned to
 <see cref="P:align-items" />. The second value is assigned to
 <see cref="P:justify-items" />; if omitted, it is copied from the first value.</p>]]></description>
    <group type="or">
      <group>
        <property id="align-items"/>
        <property id="justify-items" min="0"/>
      </group>
      <inline id="wide-keywords" inline="yes"/>
    </group>
  </property>

  <property id="place-self" declared-in="3.0" url="https://www.w3.org/TR/css-align-3/#propdef-place-self"
            applies="block-level boxes, absolutely-positioned boxes, and grid items" initial="auto" inherited="no" percentage="n/a">
    <description><![CDATA[<p>This shorthand property sets both the
 <see cref="P:align-self" /> and
 <see cref="P:justify-self" /> properties in a single declaration. The first value is assigned to
 <see cref="P:align-self" />. The second value is assigned to
 <see cref="P:justify-self" />; if omitted, it is copied from the first value.</p>]]></description>
    <group type="or">
      <group>
        <property id="align-self"/>
        <property id="justify-self" min="0"/>
      </group>
      <inline id="wide-keywords" inline="yes"/>
    </group>
  </property>

  <property id="row-gap" declared-in="3.0" url="https://www.w3.org/TR/css-align-3/#propdef-row-gap"
            applies="multi-column containers, flex containers, grid containers" initial="normal" inherited="no"
            percentage="refer to corresponding dimension of the content area">
    <description><![CDATA[<p>These properties specify fixed-length <strong>gutters</strong> between items in the container, adding space between them—<wbr>in a manner to the space-between keyword of the content-distribution properties, but of a fixed size instead of as a fraction of remaining space. The column-gap property specifies spacing between “columns”, separating boxes in the container’s inline axis similar to inline-axis margin; while
 <see cref="P:row-gap" /> indicates spacing between “rows”, separating boxes in the container’s block axis.</p>]]></description>
    <group type="or">
      <name value="normal"
            tooltip="The normal represents a used value of 1em on multi-column containers, and a used value of 0px in all other contexts."/>
      <inline id="length-percentage"
              tooltip="Specifies a gap between “rows” or “columns”, as defined by the layout modes to which it applies; see subsections below for details. Negative values are invalid. As in the min size properties and margins/paddings [CSS-SIZING-3], percentages resolve against zero for determining intrinsic size contributions, but resolve against the box’s content box when laying out the box’s contents."/>
      <inline id="wide-keywords" inline="yes"/>
    </group>
  </property>

</definitions>