Default style scope is being added in polymer 1.0Polymer 1.0 - Binding css classesPolymer and shadow DOM external stylingPrevent polymer from setting sub-elements class to style-scopeLink in paper-item inside paper-menu-button (Polymer-1.0)Usage of Polymer 1.0 paper-styles ElementPolymer paper dropdown menu button shrinkingStyling polymer paper-dropdown-menu scrollbarCan I add pseudo-element for the paper-input's label in Polymer?How to overwrite polymer component style cssangular 2 polymer elements style

Probably terminated or laid off soon; confront or not?

Should I take out a personal loan to pay off credit card debt?

Why do proponents of guns oppose gun competency tests?

ESTA declined to the US

How do I get the =LEFT function in excel, to also take the number zero as the first number?

Why can I log in to my Facebook account with a misspelled email/password?

Did Captain America make out with his niece?

How to halve redstone signal strength?

Are certificates without DNS fundamentally flawed?

Does the United States guarantee any unique freedoms?

How can I refer to something in a book?

Can a Hogwarts student refuse the Sorting Hat's decision?

Premier League simulation

Best way to explain to my boss that I cannot attend a team summit because it is on Rosh Hashana or any other Jewish Holiday

What is the bio-mechanical plausibility of a fox with venomous fangs?

Using command line how to open a specific section of GUI System Preferences?

Decode a variable-length quantity

How would a family travel from Indiana to Texas in 1911?

Why should public servants be apolitical?

What is the purpose of this mount on the upper suspension arm?

Can I enter a rental property without giving notice if I'm afraid a tenant may be hurt?

Did WWII Japanese soldiers engage in cannibalism of their enemies?

Where in ש״ס who one find the adage, “He who suggests the idea should carry it out”?

Secure my password from unsafe servers



Default style scope is being added in polymer 1.0


Polymer 1.0 - Binding css classesPolymer and shadow DOM external stylingPrevent polymer from setting sub-elements class to style-scopeLink in paper-item inside paper-menu-button (Polymer-1.0)Usage of Polymer 1.0 paper-styles ElementPolymer paper dropdown menu button shrinkingStyling polymer paper-dropdown-menu scrollbarCan I add pseudo-element for the paper-input's label in Polymer?How to overwrite polymer component style cssangular 2 polymer elements style






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








0















Default scope is added instead of required class. Trying to change color in dropdown menu under in using conditional css in Polymer 1.



 <paper-item>
<span class$ = setClass(item.no)> Polymer </span>
</paper-item>









share|improve this question


























  • Could you please share your setClass function and your depended class in <style></style>. Or you may use style="color:setColor(item.no)" and in script setColor(c) return // conditional color

    – HakanC
    Mar 27 at 16:03












  • yes, I edited it by adding the setClass function

    – ela
    Mar 28 at 4:35

















0















Default scope is added instead of required class. Trying to change color in dropdown menu under in using conditional css in Polymer 1.



 <paper-item>
<span class$ = setClass(item.no)> Polymer </span>
</paper-item>









share|improve this question


























  • Could you please share your setClass function and your depended class in <style></style>. Or you may use style="color:setColor(item.no)" and in script setColor(c) return // conditional color

    – HakanC
    Mar 27 at 16:03












  • yes, I edited it by adding the setClass function

    – ela
    Mar 28 at 4:35













0












0








0








Default scope is added instead of required class. Trying to change color in dropdown menu under in using conditional css in Polymer 1.



 <paper-item>
<span class$ = setClass(item.no)> Polymer </span>
</paper-item>









share|improve this question
















Default scope is added instead of required class. Trying to change color in dropdown menu under in using conditional css in Polymer 1.



 <paper-item>
<span class$ = setClass(item.no)> Polymer </span>
</paper-item>






css-selectors polymer polymer-1.0 shadow-dom paper-elements






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 30 at 7:44







ela

















asked Mar 27 at 5:22









elaela

271 silver badge6 bronze badges




271 silver badge6 bronze badges















  • Could you please share your setClass function and your depended class in <style></style>. Or you may use style="color:setColor(item.no)" and in script setColor(c) return // conditional color

    – HakanC
    Mar 27 at 16:03












  • yes, I edited it by adding the setClass function

    – ela
    Mar 28 at 4:35

















  • Could you please share your setClass function and your depended class in <style></style>. Or you may use style="color:setColor(item.no)" and in script setColor(c) return // conditional color

    – HakanC
    Mar 27 at 16:03












  • yes, I edited it by adding the setClass function

    – ela
    Mar 28 at 4:35
















Could you please share your setClass function and your depended class in <style></style>. Or you may use style="color:setColor(item.no)" and in script setColor(c) return // conditional color

– HakanC
Mar 27 at 16:03






Could you please share your setClass function and your depended class in <style></style>. Or you may use style="color:setColor(item.no)" and in script setColor(c) return // conditional color

– HakanC
Mar 27 at 16:03














yes, I edited it by adding the setClass function

– ela
Mar 28 at 4:35





yes, I edited it by adding the setClass function

– ela
Mar 28 at 4:35












1 Answer
1






active

oldest

votes


















1














Your example seems ok, just wrap your example double quotes. Beside you may try below:



<span style$ = "color:setClass(item.no);"> Polymer </span>


setClass(n)
if(n) return n <100 ? "blue":"red";



EDIT



Also, need to remove:<template item-template> inside oe-combo.



Demo






share|improve this answer



























  • oh thanks, as there are some other properties also like font-weight. That's why have to pass class name instead of only the color. I will try it with double quotes and let you know by tomorrow morning.

    – ela
    Mar 28 at 6:18











  • may I know the concept of how wrapping in double quotes will help. I mean what is the significance of double quotes here...

    – ela
    Mar 28 at 6:54











  • it's syntax only. As you use class="clasname". As above my example.

    – HakanC
    Mar 28 at 7:04











  • Ops I forget to warm you again. in <style> tag you need to declare: paper-item > span ... That's why I wanted to share your style code.

    – HakanC
    Mar 28 at 7:52






  • 1





    Thanks @Halank , it is working. The syntax was correct. I just had to do some work around, based on the existing code. Thanks a lot for this great help.

    – ela
    Apr 1 at 21:20











Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55370295%2fdefault-style-scope-is-being-added-in-polymer-1-0%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









1














Your example seems ok, just wrap your example double quotes. Beside you may try below:



<span style$ = "color:setClass(item.no);"> Polymer </span>


setClass(n)
if(n) return n <100 ? "blue":"red";



EDIT



Also, need to remove:<template item-template> inside oe-combo.



Demo






share|improve this answer



























  • oh thanks, as there are some other properties also like font-weight. That's why have to pass class name instead of only the color. I will try it with double quotes and let you know by tomorrow morning.

    – ela
    Mar 28 at 6:18











  • may I know the concept of how wrapping in double quotes will help. I mean what is the significance of double quotes here...

    – ela
    Mar 28 at 6:54











  • it's syntax only. As you use class="clasname". As above my example.

    – HakanC
    Mar 28 at 7:04











  • Ops I forget to warm you again. in <style> tag you need to declare: paper-item > span ... That's why I wanted to share your style code.

    – HakanC
    Mar 28 at 7:52






  • 1





    Thanks @Halank , it is working. The syntax was correct. I just had to do some work around, based on the existing code. Thanks a lot for this great help.

    – ela
    Apr 1 at 21:20
















1














Your example seems ok, just wrap your example double quotes. Beside you may try below:



<span style$ = "color:setClass(item.no);"> Polymer </span>


setClass(n)
if(n) return n <100 ? "blue":"red";



EDIT



Also, need to remove:<template item-template> inside oe-combo.



Demo






share|improve this answer



























  • oh thanks, as there are some other properties also like font-weight. That's why have to pass class name instead of only the color. I will try it with double quotes and let you know by tomorrow morning.

    – ela
    Mar 28 at 6:18











  • may I know the concept of how wrapping in double quotes will help. I mean what is the significance of double quotes here...

    – ela
    Mar 28 at 6:54











  • it's syntax only. As you use class="clasname". As above my example.

    – HakanC
    Mar 28 at 7:04











  • Ops I forget to warm you again. in <style> tag you need to declare: paper-item > span ... That's why I wanted to share your style code.

    – HakanC
    Mar 28 at 7:52






  • 1





    Thanks @Halank , it is working. The syntax was correct. I just had to do some work around, based on the existing code. Thanks a lot for this great help.

    – ela
    Apr 1 at 21:20














1












1








1







Your example seems ok, just wrap your example double quotes. Beside you may try below:



<span style$ = "color:setClass(item.no);"> Polymer </span>


setClass(n)
if(n) return n <100 ? "blue":"red";



EDIT



Also, need to remove:<template item-template> inside oe-combo.



Demo






share|improve this answer















Your example seems ok, just wrap your example double quotes. Beside you may try below:



<span style$ = "color:setClass(item.no);"> Polymer </span>


setClass(n)
if(n) return n <100 ? "blue":"red";



EDIT



Also, need to remove:<template item-template> inside oe-combo.



Demo







share|improve this answer














share|improve this answer



share|improve this answer








edited Mar 30 at 6:45

























answered Mar 28 at 4:57









HakanCHakanC

2,5713 gold badges8 silver badges14 bronze badges




2,5713 gold badges8 silver badges14 bronze badges















  • oh thanks, as there are some other properties also like font-weight. That's why have to pass class name instead of only the color. I will try it with double quotes and let you know by tomorrow morning.

    – ela
    Mar 28 at 6:18











  • may I know the concept of how wrapping in double quotes will help. I mean what is the significance of double quotes here...

    – ela
    Mar 28 at 6:54











  • it's syntax only. As you use class="clasname". As above my example.

    – HakanC
    Mar 28 at 7:04











  • Ops I forget to warm you again. in <style> tag you need to declare: paper-item > span ... That's why I wanted to share your style code.

    – HakanC
    Mar 28 at 7:52






  • 1





    Thanks @Halank , it is working. The syntax was correct. I just had to do some work around, based on the existing code. Thanks a lot for this great help.

    – ela
    Apr 1 at 21:20


















  • oh thanks, as there are some other properties also like font-weight. That's why have to pass class name instead of only the color. I will try it with double quotes and let you know by tomorrow morning.

    – ela
    Mar 28 at 6:18











  • may I know the concept of how wrapping in double quotes will help. I mean what is the significance of double quotes here...

    – ela
    Mar 28 at 6:54











  • it's syntax only. As you use class="clasname". As above my example.

    – HakanC
    Mar 28 at 7:04











  • Ops I forget to warm you again. in <style> tag you need to declare: paper-item > span ... That's why I wanted to share your style code.

    – HakanC
    Mar 28 at 7:52






  • 1





    Thanks @Halank , it is working. The syntax was correct. I just had to do some work around, based on the existing code. Thanks a lot for this great help.

    – ela
    Apr 1 at 21:20

















oh thanks, as there are some other properties also like font-weight. That's why have to pass class name instead of only the color. I will try it with double quotes and let you know by tomorrow morning.

– ela
Mar 28 at 6:18





oh thanks, as there are some other properties also like font-weight. That's why have to pass class name instead of only the color. I will try it with double quotes and let you know by tomorrow morning.

– ela
Mar 28 at 6:18













may I know the concept of how wrapping in double quotes will help. I mean what is the significance of double quotes here...

– ela
Mar 28 at 6:54





may I know the concept of how wrapping in double quotes will help. I mean what is the significance of double quotes here...

– ela
Mar 28 at 6:54













it's syntax only. As you use class="clasname". As above my example.

– HakanC
Mar 28 at 7:04





it's syntax only. As you use class="clasname". As above my example.

– HakanC
Mar 28 at 7:04













Ops I forget to warm you again. in <style> tag you need to declare: paper-item > span ... That's why I wanted to share your style code.

– HakanC
Mar 28 at 7:52





Ops I forget to warm you again. in <style> tag you need to declare: paper-item > span ... That's why I wanted to share your style code.

– HakanC
Mar 28 at 7:52




1




1





Thanks @Halank , it is working. The syntax was correct. I just had to do some work around, based on the existing code. Thanks a lot for this great help.

– ela
Apr 1 at 21:20






Thanks @Halank , it is working. The syntax was correct. I just had to do some work around, based on the existing code. Thanks a lot for this great help.

– ela
Apr 1 at 21:20









Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.







Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.



















draft saved

draft discarded
















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid …


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55370295%2fdefault-style-scope-is-being-added-in-polymer-1-0%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

How to preserve electronics (computers, tablets and phones) for hundreds of years Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern) The network's official Twitter account is up and running again. What content…How might modern humans leave a message for 50,000 years?How would an aquatic race develop computers?How do we make computers care for human life?Keeping supplies for 1000 yearsWhat will cell phones become in 100 years?What body armor protects against a laser?Could a society attain 1800s technology if limited to using copper and bronze?Electricity power (magic) and electronicsScavenging metal resources in post-apocalypse after 100 yearsWhy would precursors create devices that can survive and still work after hundreds of years?

155 수학 과학 기타 둘러보기 메뉴eh추가해eh문서를 완성해

Convert JSON to MapSimplest way to convert a string representing JSON array into Java array List of key value pairsHow to take String JSON values into HashMapConvert a JSON String to a HashMapCreating BSON object from JSON stringJSONObject - How to get a value ?Better Map ConstructorReading JSON from Url javaUpdate columns if input values are not null otherwise ignore and keep the existing values of column in databaseHow to store object represented as Json string into Couchbase Lite?Go JSON into MapHow do I efficiently iterate over each entry in a Java Map?Sort a Map<Key, Value> by valuesHow to round a number to n decimal places in JavaCan comments be used in JSON?How do I read / convert an InputStream into a String in Java?How can I pretty-print JSON in a shell script?What is the correct JSON content type?How can I deserialize JSON to a simple Dictionary<string,string> in ASP.NET?Why does Google prepend while(1); to their JSON responses?Parse JSON in JavaScript?