-
Notifications
You must be signed in to change notification settings - Fork 73
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
blog.hospodarets.com - layout is messed up #3685
Comments
It works in both Chrome (54+) and Safari (10.0.1+). |
Thanks for the report! I agree with the assessment that it's a Firefox issue, so I've filed a bug report. I'll try to keep this issue updated if that bug changes. |
Hey @simevidas , @wisniewskit E.g. https://blog.hospodarets.com/you-might-not-need-a-css-preprocessor/demos/no-preprocessor-css-colors-from-custom-props/ (the demo where --r,--g and --b custom properties are assigned from sliders via JS and then background-color(s) are generated using them and the calc() function, with 4 options) :
|
@malyw Might be worth filing a bug for number 2 😅 |
@simevidas
|
@malyw That’s a spec snapshot from 2011 😉. Always use editor’s drafts; the values are full |
In fact, the problem is not that calc() is between transform functions and var(), but that firefox does not support the degrees inside calc(). Here is an example of how we can move |
@firefoxic thanks for pointing out. True, looks like a Firefox bug, cheers. |
And calc() with var() inside the transform functions, even if it was a problem, it could be solved quite simply: #world{
--translateZ:0;
--rotateX:65;
--rotateY:0;
--Zpx: calc(var(--translateZ) * 1px);
--Xdeg: calc(var(--rotateX) * 1deg);
--Ydeg: calc(var(--rotateY) * 1deg);
transform-style:preserve-3d;
transform:translateZ(var(--Zpx)) rotateX(var(--Xdeg)) rotateY(var(--Ydeg));
} But this also does not work, because the problem is with the angular units inside the calc(). |
This now works using the new Stylo CSS engine, which just became enabled by default in the nightly Firefox builds and should hopefully make it into the stable builds by Firefox 57 or 58. |
URL: https://blog.hospodarets.com/demos/no-preprocessor-css-3d-cube/
Browser / Version: Firefox 52.0
Operating System: Windows 10
Problem type: Layout is messed up
Steps to Reproduce
Expected Behavior:
You should see a CSS 3D “scene” which responds to mouse cursor position and scroll wheel.
Actual Behavior:
You will see a flat, non-interactive scene.
You can see how the 3D effect works in this GIF. Firefox does not seem to support
var()
insidecalc()
. When I usevar()
directly inside the 3D transform functions, it works in Firefox, but when there is acalc()
in between, Firefox doesn’t recognize it.From webcompat.com with ❤️
The text was updated successfully, but these errors were encountered: