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

Binding not working for open text #1677

Closed
pawelstep opened this issue May 30, 2015 · 3 comments
Closed

Binding not working for open text #1677

pawelstep opened this issue May 30, 2015 · 3 comments

Comments

@pawelstep
Copy link

MyCaption = {{caption}}

This above does not work. Currently binding works only for entire attribute or for entire tag content
{{caption}}.

Ideallly, binding should work for any piece of text within DOM, like it was in 0.5

The company {{company}} CEO is {{ceo}}

More, this should work also for CSS customizations (text insertions), and class selectors and inline-style (I know there are other ways to do it, but that was really great in 0.55):
<style>
div {
background-color:{{bkgcolor}}
}
.caption {
color:{{fontcolor}}
}
.caption .level1 {
font-size:10pt;
}
.caption .level2 {
font-size:8pt;
}
.caption .level3 {
font-size:8pt;
}
</style>

My Text

@IntranetFactory
Copy link

That's by design

The binding annotation must currently span the entire content of the tag:

See https://www.polymer-project.org/1.0/docs/devguide/data-binding.html

@pawelstep
Copy link
Author

Let me correct the layout :

MyCaption={{caption}}

This above does not work. Currently binding works only for entire attribute or for entire tag content e.g.
{{caption}}

I've seen already your comment 'that's by design'. It's a pity.
So please consider the below ones too:

More, this should work also for:(I know there are other ways to do it, but that was really great in 0.55):

  • CSS customizations (text insertions),
  • class selectors
  • inline-style.

<style>
div { background-color:{{bkgcolor}} }
.caption { color:{{fontcolor}} }
.caption .level1 { font-size:10pt; }
.caption .level2 { font-size:8pt; }
.caption .level3 { font-size:7pt; }
</style>

MyText

@kevinpschaaf
Copy link
Member

The feature wasn't forgotten, we just didn't quite land that for 1.0, but it's documented on the near-term roadmap.
https://www.polymer-project.org/1.0/docs/#binding-features

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants