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

Make element.style more clear that it's just the style attribute #4895

Closed
sethladd opened this issue Sep 4, 2012 · 11 comments
Closed

Make element.style more clear that it's just the style attribute #4895

sethladd opened this issue Sep 4, 2012 · 11 comments
Labels
area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. closed-obsolete Closed as the reported issue is no longer relevant library-html P2 A bug or feature request we're likely to work on type-enhancement A request for a change that isn't a bug

Comments

@sethladd
Copy link
Contributor

sethladd commented Sep 4, 2012

See also mailing list thread: https://groups.google.com/a/dartlang.org/forum/?fromgroups=#!topic/misc/vMJqwwK0lM8

It's confusing that element.style captures only the style attribute, not "any style applied to the element". You can use "getComputedStyle" for this, but that's an opaque name for new developers.

As Dart wants to help all developers build for the web, it is suggested that we make things a bit more clear.

Some strawmen:

* Rename element.style to element.styleAttribute

  • Rename element.getComputedStyle to element.styleComplete (??)
@sethladd
Copy link
Contributor Author

sethladd commented Sep 4, 2012

Added this to the Later milestone.

@sethladd
Copy link
Contributor Author

sethladd commented Sep 4, 2012

Another option is to go all in and make element.style reflect the computed style. This is what jQuery does: http://api.jquery.com/category/manipulation/style-properties/

@DartBot
Copy link

DartBot commented Sep 4, 2012

This comment was originally written by gp7...@gmail.com


Hi,

I would suggest:
1)
To keep known terminology to avoid collisions with standard W3C terminology in the future.
2)
To finish the documentation of the dart:html API and to make at least clear what is Dart specific and what is more or less standard in the W3C world.

I have read this post: http://code.google.com/p/doctype-mirror/wiki/ArticleComputedStyleVsCascadedStyle

As I understand, the computed or "dynamic" style in pixels is not just the information that is statically given in the CSS file or html file.

So I would rather like to have a difference between:

  • staticStyle or declaredStyle
  • dynamicStyle or computedStyle in pixels

Best regards

@DartBot
Copy link

DartBot commented Sep 4, 2012

This comment was originally written by gp78...@gmail.com


Maybe even a distinction between:

  • internalStyle or xmlStyle for the style declared in the HTML element definition.
  • externalStyle or cssStyle for the style declared in some CSS block.

@DartBot
Copy link

DartBot commented Sep 4, 2012

This comment was originally written by gp78...@gmail.com


I guess that the Dart team wants to express the CSS and XML information of the DOM in terms of Dart native objects.
Hence it might be useful to have:

  • element.xml to get the current XML representation of the element as object.
  • element.css to get the static CSS information as object.
  • element.style for the complete current style in terms of original expressions like 50% or color "red".
  • element.styleAbsolute for the complete current computed style in terms of pixels and RGBA.

@sethladd
Copy link
Contributor Author

See also issue #5048

@efortuna
Copy link
Contributor

efortuna commented Oct 3, 2013

Added html-api label.

@blois
Copy link
Contributor

blois commented Oct 3, 2013

Removed html-api label.

@kevmoo
Copy link
Member

kevmoo commented Apr 7, 2014

Removed Area-HTML label.
Added Area-Library, Library-Html labels.

@kasperl
Copy link

kasperl commented Jul 10, 2014

Removed this from the Later milestone.
Added Oldschool-Milestone-Later label.

@kasperl
Copy link

kasperl commented Aug 4, 2014

Removed Oldschool-Milestone-Later label.

@sethladd sethladd added Type-Enhancement area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. library-html labels Aug 4, 2014
@kevmoo kevmoo added P2 A bug or feature request we're likely to work on type-enhancement A request for a change that isn't a bug and removed triaged labels Feb 29, 2016
@matanlurey matanlurey added the closed-obsolete Closed as the reported issue is no longer relevant label Jun 19, 2018
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. closed-obsolete Closed as the reported issue is no longer relevant library-html P2 A bug or feature request we're likely to work on type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

7 participants