mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-03-14 12:18:30 +03:00
Use data attr instead
The JSX className modification classes with this DOM-based modification
This commit is contained in:
parent
8a10a81fec
commit
17a3939061
2 changed files with 2 additions and 2 deletions
|
@ -374,7 +374,7 @@ function Media({
|
|||
Math.abs(naturalAspectRatio - displayAspectRatio) <
|
||||
similarThreshold
|
||||
) {
|
||||
$media.classList.add('has-natural-aspect-ratio');
|
||||
$media.dataset.hasNaturalAspectRatio = true;
|
||||
}
|
||||
// $media.dataset.aspectRatios = `${naturalAspectRatio} ${displayAspectRatio}`;
|
||||
}
|
||||
|
|
|
@ -1071,7 +1071,7 @@
|
|||
width: min(var(--aspectWidth), var(--width), 100%);
|
||||
max-height: min(var(--height), 33vh);
|
||||
|
||||
&.has-natural-aspect-ratio {
|
||||
&[data-has-natural-aspect-ratio] {
|
||||
--media-radius: 4px;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue