Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: sync css type to 3.1.3 #23

Merged
merged 1 commit into from
May 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions generator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ function generatePropertyItems(input: string, output: string, start: number, end
const tab = ' ';
let propTypes: PropertyType[] = []
if (useGeneric) {
const propLines = getFileContent('./node_modules/csstype/index.d.ts', 18459, 20144);
const propLines = getFileContent('./node_modules/csstype/index.d.ts', 18948, 20690);
propTypes = getPropertyTypes(propLines)
}
const items = getPropertyItems(lines, propTypes);
Expand Down Expand Up @@ -329,32 +329,32 @@ ${sb} }
function generateProperty() {
const input = './node_modules/csstype/index.d.ts';
const output = './src/Css/Property.cs';
generatePropertyTypes(input, output, 18459, 20144);
generatePropertyTypes(input, output, 18948, 20690);
generatePropertyGeneric('./src/Css/PropertyT.cs', 4);
}

function generateStandardLonghand() {
const input = './node_modules/csstype/index.d.ts';
const output = './src/Css/CSSObject.StandardLonghand.cs';
generatePropertyItems(input, output, 11, 5064);
generatePropertyItems(input, output, 11, 5283);
}

function generateStandardShorthand() {
const input = './node_modules/csstype/index.d.ts';
const output = './src/Css/CSSObject.StandardShorthand.cs';
generatePropertyItems(input, output, 5066, 5864);
generatePropertyItems(input, output, 5285, 6109);
}

function generateVendorLonghand() {
const input = './node_modules/csstype/index.d.ts';
const output = './src/Css/CSSObject.VendorLonghand.cs';
generatePropertyItems(input, output, 5870, 7663);
generatePropertyItems(input, output, 6115, 7868);
}

function generateVendorShorthand() {
const input = './node_modules/csstype/index.d.ts';
const output = './src/Css/CSSObject.VendorShorthand.cs';
generatePropertyItems(input, output, 7665, 7816);
generatePropertyItems(input, output, 7870, 8021);
}

function generateUnitless() {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"devDependencies": {
"@emotion/unitless": "^0.8.1",
"@types/node": "^18.16.1",
"csstype": "^3.1.2",
"csstype": "3.1.3",
"less": "^4.1.3",
"ts-node": "^10.9.1",
"tslib": "^2.5.0"
Expand Down
613 changes: 426 additions & 187 deletions src/Css/CSSObject.StandardLonghand.cs

Large diffs are not rendered by default.

74 changes: 52 additions & 22 deletions src/Css/CSSObject.StandardShorthand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,20 @@ public Property<PropertySkip, string> Animation
set => _properties["animation"] = value;
}

/// <summary>
/// The **`animation-range`** CSS shorthand property is used to set the start and end of an animation's attachment range along its timeline, i.e. where along the timeline an animation will start and end.
/// <para> **Syntax**: `[ &lt;'animation-range-start'&gt; &lt;'animation-range-end'&gt;? ]#`</para>
/// <para> | Chrome | Firefox | Safari | Edge | IE |</para>
/// <para> | :-----: | :-----: | :----: | :--: | :-: |</para>
/// <para> | **115** | No | No | n/a | No |</para>
/// <para> @see https://developer.mozilla.org/docs/Web/CSS/animation-range</para>
/// </summary>
public Property<PropertySkip, string, double> AnimationRange
{
get => (Property<PropertySkip, string, double>) _properties["animation-range"];
set => _properties["animation-range"] = value;
}

/// <summary>
/// The **`background`** shorthand CSS property sets all background style properties at once, such as color, image, origin and size, or repeat method.
/// <para> **Syntax**: `[ &lt;bg-layer&gt; , ]* &lt;final-bg-layer&gt;`</para>
Expand Down Expand Up @@ -327,10 +341,10 @@ public Property<PropertySkip, string, double> Columns

/// <summary>
/// The **`contain-intrinsic-size`** CSS shorthand property sets the size of an element that a browser will use for layout when the element is subject to size containment.
/// <para> **Syntax**: `[ none | &lt;length&gt; | auto &lt;length&gt; ]{1,2}`</para>
/// <para> **Syntax**: `[ auto? [ none | &lt;length&gt; ] ]{1,2}`</para>
/// <para> | Chrome | Firefox | Safari | Edge | IE |</para>
/// <para> | :----: | :-----: | :----: | :--: | :-: |</para>
/// <para> | **83** | **107** | No | n/a | No |</para>
/// <para> | **83** | **107** | **17** | n/a | No |</para>
/// <para> @see https://developer.mozilla.org/docs/Web/CSS/contain-intrinsic-size</para>
/// </summary>
public Property<PropertySkip, string, double> ContainIntrinsicSize
Expand Down Expand Up @@ -592,9 +606,10 @@ public Property<PropertySkip, string, double> MarginInline
/// <summary>
/// The **`mask`** CSS shorthand property hides an element (partially or fully) by masking or clipping the image at specific points.
/// <para> **Syntax**: `&lt;mask-layer&gt;#`</para>
/// <para> | Chrome | Firefox | Safari | Edge | IE |</para>
/// <para> | :----: | :-----: | :-----: | :---: | :-: |</para>
/// <para> | **1** | **2** | **3.1** | 12-79 | No |</para>
/// <para> | Chrome | Firefox | Safari | Edge | IE |</para>
/// <para> | :----: | :-----: | :-------: | :---: | :-: |</para>
/// <para> | **1** | **53** | **15.4** | 12-79 | No |</para>
/// <para> | | | 3.1 _-x-_ | | |</para>
/// <para> @see https://developer.mozilla.org/docs/Web/CSS/mask</para>
/// </summary>
public Property<PropertySkip, string, double> Mask
Expand All @@ -606,9 +621,10 @@ public Property<PropertySkip, string, double> Mask
/// <summary>
/// The **`mask-border`** CSS shorthand property lets you create a mask along the edge of an element's border.
/// <para> **Syntax**: `&lt;'mask-border-source'&gt; || &lt;'mask-border-slice'&gt; [ / &lt;'mask-border-width'&gt;? [ / &lt;'mask-border-outset'&gt; ]? ]? || &lt;'mask-border-repeat'&gt; || &lt;'mask-border-mode'&gt;`</para>
/// <para> | Chrome | Firefox | Safari | Edge | IE |</para>
/// <para> | :------------------------------: | :-----: | :--------------------------------: | :--: | :-: |</para>
/// <para> | **1** _(-webkit-mask-box-image)_ | No | **3.1** _(-webkit-mask-box-image)_ | n/a | No |</para>
/// <para> | Chrome | Firefox | Safari | Edge | IE |</para>
/// <para> | :------------------------------: | :-----: | :----------------------------: | :--: | :-: |</para>
/// <para> | **1** _(-webkit-mask-box-image)_ | No | **17.2** | n/a | No |</para>
/// <para> | | | 3.1 _(-webkit-mask-box-image)_ | | |</para>
/// <para> @see https://developer.mozilla.org/docs/Web/CSS/mask-border</para>
/// </summary>
public Property<PropertySkip, string, double> MaskBorder
Expand Down Expand Up @@ -650,9 +666,9 @@ public Property<PropertySkip, string, double> Offset
/// <summary>
/// The **`outline`** CSS shorthand property sets most of the outline properties in a single declaration.
/// <para> **Syntax**: `[ &lt;'outline-color'&gt; || &lt;'outline-style'&gt; || &lt;'outline-width'&gt; ]`</para>
/// <para> | Chrome | Firefox | Safari | Edge | IE |</para>
/// <para> | :----: | :-----: | :-----: | :----: | :---: |</para>
/// <para> | **94** | **88** | **1.2** | **94** | **8** |</para>
/// <para> | Chrome | Firefox | Safari | Edge | IE |</para>
/// <para> | :----: | :-----: | :------: | :----: | :---: |</para>
/// <para> | **94** | **88** | **16.4** | **94** | **8** |</para>
/// <para> @see https://developer.mozilla.org/docs/Web/CSS/outline</para>
/// </summary>
public Property<PropertySkip, string, double> Outline
Expand Down Expand Up @@ -793,9 +809,9 @@ public Property<PropertySkip, string, double> ScrollMargin
/// <summary>
/// The `scroll-margin-block` shorthand property sets the scroll margins of an element in the block dimension.
/// <para> **Syntax**: `&lt;length&gt;{1,2}`</para>
/// <para> | Chrome | Firefox | Safari | Edge | IE |</para>
/// <para> | :----: | :-----: | :------: | :--: | :-: |</para>
/// <para> | **69** | **68** | **14.1** | n/a | No |</para>
/// <para> | Chrome | Firefox | Safari | Edge | IE |</para>
/// <para> | :----: | :-----: | :----: | :--: | :-: |</para>
/// <para> | **69** | **68** | **15** | n/a | No |</para>
/// <para> @see https://developer.mozilla.org/docs/Web/CSS/scroll-margin-block</para>
/// </summary>
public Property<PropertySkip, string, double> ScrollMarginBlock
Expand All @@ -807,9 +823,9 @@ public Property<PropertySkip, string, double> ScrollMarginBlock
/// <summary>
/// The `scroll-margin-inline` shorthand property sets the scroll margins of an element in the inline dimension.
/// <para> **Syntax**: `&lt;length&gt;{1,2}`</para>
/// <para> | Chrome | Firefox | Safari | Edge | IE |</para>
/// <para> | :----: | :-----: | :------: | :--: | :-: |</para>
/// <para> | **69** | **68** | **14.1** | n/a | No |</para>
/// <para> | Chrome | Firefox | Safari | Edge | IE |</para>
/// <para> | :----: | :-----: | :----: | :--: | :-: |</para>
/// <para> | **69** | **68** | **15** | n/a | No |</para>
/// <para> @see https://developer.mozilla.org/docs/Web/CSS/scroll-margin-inline</para>
/// </summary>
public Property<PropertySkip, string, double> ScrollMarginInline
Expand Down Expand Up @@ -877,10 +893,10 @@ public Property<PropertySkip, string, double> ScrollSnapMargin

/// <summary>
/// The **`scroll-timeline`** CSS shorthand property defines a name that can be used to identify the source element of a scroll timeline, along with the scrollbar axis that should provide the timeline.
/// <para> **Syntax**: `[&lt;'scroll-timeline-name'&gt; &lt;'scroll-timeline-axis'&gt;?]#`</para>
/// <para> | Chrome | Firefox | Safari | Edge | IE |</para>
/// <para> | :----: | :-----: | :----: | :--: | :-: |</para>
/// <para> | No | n/a | No | n/a | No |</para>
/// <para> **Syntax**: `[ &lt;'scroll-timeline-name'&gt; &lt;'scroll-timeline-axis'&gt;? ]#`</para>
/// <para> | Chrome | Firefox | Safari | Edge | IE |</para>
/// <para> | :-----: | :-----: | :----: | :--: | :-: |</para>
/// <para> | **115** | n/a | No | n/a | No |</para>
/// <para> @see https://developer.mozilla.org/docs/Web/CSS/scroll-timeline</para>
/// </summary>
public Property<PropertySkip, string> ScrollTimeline
Expand Down Expand Up @@ -924,7 +940,7 @@ public Property<PropertySkip, string> TextEmphasis
/// <para> | Chrome | Firefox | Safari | Edge | IE |</para>
/// <para> | :-----: | :-----: | :-------: | :----: | :----: |</para>
/// <para> | **26** | **16** | **9** | **12** | **10** |</para>
/// <para> | 1 _-x-_ | 4 _-x-_ | 3.1 _-x-_ | | |</para>
/// <para> | 1 _-x-_ | | 3.1 _-x-_ | | |</para>
/// <para> @see https://developer.mozilla.org/docs/Web/CSS/transition</para>
/// </summary>
public Property<PropertySkip, string> Transition
Expand All @@ -933,5 +949,19 @@ public Property<PropertySkip, string> Transition
set => _properties["transition"] = value;
}

/// <summary>
/// The **`view-timeline`** CSS shorthand property is used to define a _named view progress timeline_, which is progressed through based on the change in visibility of an element (known as the _subject_) inside a scrollable element (_scroller_). `view-timeline` is set on the subject.
/// <para> **Syntax**: `[ &lt;'view-timeline-name'&gt; &lt;'view-timeline-axis'&gt;? ]#`</para>
/// <para> | Chrome | Firefox | Safari | Edge | IE |</para>
/// <para> | :-----: | :-----: | :----: | :--: | :-: |</para>
/// <para> | **115** | n/a | No | n/a | No |</para>
/// <para> @see https://developer.mozilla.org/docs/Web/CSS/view-timeline</para>
/// </summary>
public Property<PropertySkip, string> ViewTimeline
{
get => (Property<PropertySkip, string>) _properties["view-timeline"];
set => _properties["view-timeline"] = value;
}

}
}
Loading
Loading