Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
5 changes: 5 additions & 0 deletions .changeset/crazy-views-sit.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@lynx-js/web-elements": patch
---

fix: firefox `@supports(width:1rex)`
Comment thread
PupilTong marked this conversation as resolved.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
*/
@supports not
((content-visibility: auto) and (transition-behavior: allow-discrete) and
(width: 1rex)) {
(-webkit-box-reflect: above)) {
Comment thread
PupilTong marked this conversation as resolved.
* {
--lynx-display: linear;
--lynx-linear-weight-sum: 1;
Expand All @@ -47,6 +47,7 @@
--flex-wrap: nowrap;
--align-self: auto;
}

[lynx-computed-display="linear"] {
flex-wrap: nowrap !important;
flex-direction: column;
Expand All @@ -61,11 +62,9 @@

[lynx-computed-display="flex"] > *,
[lynx-computed-display="flex"] > lynx-wrapper > * {
flex: var(
--flex,
var(--flex-grow) var(--flex-shrink) var(--flex-basis)
);
flex: var(--flex, var(--flex-grow) var(--flex-shrink) var(--flex-basis));
}

[lynx-computed-display="linear"] > *,
[lynx-computed-display="linear"] > lynx-wrapper > * {
flex-shrink: 0 !important;
Expand Down Expand Up @@ -111,6 +110,7 @@
> * {
align-self: var(--align-self-column);
}

[lynx-computed-display="linear"][lynx-linear-orientation="horizontal"] > *,
[lynx-computed-display="linear"][lynx-linear-orientation="horizontal-reverse"],
[lynx-computed-display="linear"][lynx-linear-orientation="horizontal"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,51 +7,61 @@
inherits: false;
initial-value: linear;
}

@property --lynx-linear-weight-sum {
syntax: "<number>";
inherits: false;
initial-value: 1;
}

@property --lynx-linear-weight {
syntax: "<number>";
inherits: false;
initial-value: 0;
}

@property --justify-content-column {
syntax: "flex-start|flex-end|center|space-between|space-around";
inherits: false;
initial-value: flex-start;
}

@property --justify-content-column-reverse {
syntax: "flex-start|flex-end|center|space-between|space-around";
inherits: false;
initial-value: flex-start;
}

@property --justify-content-row {
syntax: "flex-start|flex-end|center|space-between|space-around";
inherits: false;
initial-value: flex-start;
}

@property --justify-content-row-reverse {
syntax: "flex-start|flex-end|center|space-between|space-around";
inherits: false;
initial-value: flex-start;
}

@property --align-self-row {
syntax: "start|end|center|stretch|auto";
inherits: false;
initial-value: auto;
}

@property --align-self-column {
syntax: "start|end|center|stretch|auto";
inherits: false;
initial-value: auto;
}

@property --lynx-linear-weight-basis {
syntax: "auto|<number>|<length>";
inherits: false;
initial-value: auto;
}

@property --lynx-linear-orientation {
syntax: "<custom-ident>";
inherits: false;
Expand All @@ -62,29 +72,35 @@
syntax: "*";
inherits: false;
}

@property --flex-wrap {
syntax: "*";
inherits: false;
}

@property --flex-grow {
syntax: "<number>";
inherits: false;
initial-value: 0;
}

@property --flex-shrink {
syntax: "<number>";
inherits: false;
initial-value: 1;
}

@property --flex-basis {
syntax: "*";
inherits: false;
initial-value: auto;
}

@property --flex-value {
syntax: "*";
inherits: false;
}

@property --flex {
syntax: "*";
inherits: false;
Expand Down Expand Up @@ -189,6 +205,7 @@ list-item {
var(--justify-content-column-reverse)
);
}

x-view,
x-foldview-header-ng,
x-foldview-ng,
Expand All @@ -203,15 +220,9 @@ x-viewpager-item-ng,
x-viewpager-ng,
list-item {
flex-wrap: var(--lynx-display-linear, nowrap)
var(
--lynx-display-flex,
var(--flex-wrap)
);
var(--lynx-display-flex, var(--flex-wrap));
flex-direction: var(--lynx-display-linear, var(--linear-flex-direction))
var(
--lynx-display-flex,
var(--flex-direction)
);
var(--lynx-display-flex, var(--flex-direction));
justify-content: var(--lynx-display-linear, var(--linear-justify-content));
}

Expand Down Expand Up @@ -250,8 +261,8 @@ list-item {
* it fixed in 116.0.5806.0, detail: https://issues.chromium.org/issues/40270007
*
* so we limit this feature to chrome 117, safari 18, firefox no:
* rex unit: chrome 111, safari 17.2, firefox no
* https://developer.mozilla.org/en-US/docs/Web/CSS/length
* -webkit-box-reflect: chrome 4, safari 4, firefox no
* https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Properties/-webkit-box-reflect
* transition-behavior:allow-discrete: chrome 117, safari 18, firefox 125
* https://developer.mozilla.org/en-US/docs/Web/CSS/transition-behavior
* https://caniuse.com/mdn-css_properties_display_is_transitionable
Expand All @@ -260,7 +271,7 @@ list-item {
*
*/
@supports (content-visibility: auto) and
(transition-behavior: allow-discrete) and (width: 1rex) {
(transition-behavior: allow-discrete) and (-webkit-box-reflect: above) {
@container style(--lynx-display: linear) {
Comment thread
PupilTong marked this conversation as resolved.
x-view,
x-blur-view,
Expand Down Expand Up @@ -333,10 +344,7 @@ list-item {
x-textarea,
x-list,
list-item {
flex: var(
--flex,
var(--flex-grow) var(--flex-shrink) var(--flex-basis)
);
flex: var(--flex, var(--flex-grow) var(--flex-shrink) var(--flex-basis));
}
}

Expand Down
Loading