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

CssStyleDeclaration setProperty doesn't work with -webkit-* properties #18167

Open
DartBot opened this issue Apr 11, 2014 · 3 comments
Open

CssStyleDeclaration setProperty doesn't work with -webkit-* properties #18167

DartBot opened this issue Apr 11, 2014 · 3 comments
Labels
area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. area-web Use area-web for Dart web related issues, including the DDC and dart2js compilers and JS interop. library-html status-blocked Blocked from making progress by another (referenced) issue type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) web-libraries Issues impacting dart:html, etc., libraries

Comments

@DartBot
Copy link

DartBot commented Apr 11, 2014

This issue was originally filed by djean...@google.com


What steps will reproduce the problem?

      DivElement e = querySelector("#a-div");
      e.style.setProperty("-webkit-mask-image", "-webkit-gradient(linear, "
          "left top, right top, "
          "from(rgba(0,0,0,0)), "
          "color-stop(0.7, rgba(0,0,0,0)), "
          "to(rgba(0,0,0,1)));");
      print("with setProperty: ${e.style.getPropertyValue("-webkit-mask-image")}");
      e.style.cssText = "-webkit-mask-image: -webkit-gradient(linear, "
          "left top, right top, "
          "from(rgba(0,0,0,0)), "
          "color-stop(0.7, rgba(0,0,0,0)), "
          "to(rgba(0,0,0,1)));";
      print("with cssText: ${e.style.getPropertyValue("-webkit-mask-image")}");

      e.style.setProperty("opacity", "0.7");
      print("with setProperty: ${e.style.getPropertyValue("opacity")}");
      e.style.cssText = "opacity: 0.7;";
      print("with cssText: ${e.style.getPropertyValue("opacity")}");

What is the expected output? What do you see instead?

Result:
with setProperty:
with cssText: -webkit-gradient(linear, 0% 0%, 100% 0%, from(rgba(0, 0, 0, 0)), color-stop(0.7, rgba(0, 0, 0, 0)), to(rgb(0, 0, 0)))
with setProperty: 0.7
with cssText: 0.7

Expected:
with setProperty: -webkit-gradient(linear, 0% 0%, 100% 0%, from(rgba(0, 0, 0, 0)), color-stop(0.7, rgba(0, 0, 0, 0)), to(rgb(0, 0, 0)))
with cssText: -webkit-gradient(linear, 0% 0%, 100% 0%, from(rgba(0, 0, 0, 0)), color-stop(0.7, rgba(0, 0, 0, 0)), to(rgb(0, 0, 0)))
with setProperty: 0.7
with cssText: 0.7

What version of the product are you using? On what operating system?
Linux, 1.4.0-dev.2.0

Please provide any additional information below.

@sethladd
Copy link
Contributor

Added Library-Html, Area-Library, Triaged labels.

@efortuna
Copy link
Contributor

Setting status to "Waiting". I filed a bug on Chrome, but basically this seems to be a Chrome issue rather than a Dart one.

Blocked on the surrounding Chrome bug: https://code.google.com/p/chromium/issues/detail?id=406109


Added Waiting label.

@alan-knight
Copy link
Contributor

Still waiting...

@DartBot DartBot added Type-Defect library-html area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. labels Jan 28, 2015
@kevmoo kevmoo added status-blocked Blocked from making progress by another (referenced) issue and removed waiting labels Feb 8, 2016
@kevmoo kevmoo added type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) and removed priority-unassigned labels Feb 29, 2016
@vsmenon vsmenon added the area-web Use area-web for Dart web related issues, including the DDC and dart2js compilers and JS interop. label Jul 20, 2019
@sigmundch sigmundch added the web-libraries Issues impacting dart:html, etc., libraries label Oct 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. area-web Use area-web for Dart web related issues, including the DDC and dart2js compilers and JS interop. library-html status-blocked Blocked from making progress by another (referenced) issue type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) web-libraries Issues impacting dart:html, etc., libraries
Projects
None yet
Development

No branches or pull requests

7 participants