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

Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

Swift 4 - func physicsWorld not invoked on collision? The Next CEO of Stack OverflowHow to call Objective-C code from Swift#ifdef replacement in the Swift language@selector() in Swift?#pragma mark in Swift?Swift for loop: for index, element in array?dispatch_after - GCD in Swift?Swift Beta performance: sorting arraysSplit a String into an array in Swift?The use of Swift 3 @objc inference in Swift 4 mode is deprecated?How to optimize UITableViewCell, because my UITableView lags

Access current req object everywhere in Node.js ExpressWhy are global variables considered bad practice? (node.js)Using req & res across functionsHow do I get the path to the current script with Node.js?What is Node.js' Connect, Express and “middleware”?Node.js w/ express error handling in callbackHow to access the GET parameters after “?” in Express?Modify Node.js req object parametersAccess “app” variable inside of ExpressJS/ConnectJS middleware?Node.js Express app - request objectAngular Http Module considered middleware?Session variables in ExpressJSAdd properties to the req object in expressjs with Typescript