Bug 104390 - calc() not working inside translateX
Summary: calc() not working inside translateX
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-12-07 12:34 PST by James Burke
Modified: 2013-03-04 13:00 PST (History)
1 user (show)

See Also:


Attachments
test page showing the issue (870 bytes, text/html)
2012-12-07 12:34 PST, James Burke
no flags Details
Image showing expected rendering of the test page (41.68 KB, image/png)
2012-12-07 12:34 PST, James Burke
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description James Burke 2012-12-07 12:34:32 PST
Created attachment 178253 [details]
test page showing the issue

While -webkit-calc() works for a property like width, this done not seem to work:

.card.second {
    transform: translateX(-webkit-calc(100% - 4.3em));
    transform: translateX(calc(100% - 4.3em));
}

That for is allowed in Firefox 18.

Attaching a test page and a screenshot with the expected result.
Comment 1 James Burke 2012-12-07 12:34:59 PST
Created attachment 178255 [details]
Image showing expected rendering of the test page
Comment 2 Alexander Shalamov 2013-03-04 00:49:20 PST
(In reply to comment #0)
> Created an attachment (id=178253) [details]
> test page showing the issue
> 
> While -webkit-calc() works for a property like width, this done not seem to work:
> 
> .card.second {
>     transform: translateX(-webkit-calc(100% - 4.3em));
>     transform: translateX(calc(100% - 4.3em));
> }
> 
> That for is allowed in Firefox 18.
> 
> Attaching a test page and a screenshot with the expected result.

I think transformations are prefixed at the moment. With -webkit-transform CSS property name, I get same result as in the attached image.
Comment 3 James Burke 2013-03-04 13:00:27 PST
Sorry for wasting your time, prefixing was the problem.