css - Inherit text-shadow with units relative to a child element without selecting all children -


i want create text shadow element, , want children of element inherit shadow. issue relative units (i.e.: em, ex, ch) of inherited text-shadow relative calculated font-size of element created on (i.e.: parent element).

also, understand that

parent, parent * {     text-shadow: 1em 2em 3em currentcolor; } 

will work fine, i'd prefer avoid * selector. don't want select every single child element, more importantly, don't want mess specificity.

(how) possible?

(i unable comment restriction of 50 poitns comments, hence question in answer tab & possible solution update based on answers:p)

so @uber5001, question 1: clarity, selecting child elements or not? first line did say, want select child elements. , @ end of question said, don't want select children of parent element. sorry couldn't understand meant that.

in jsfiddle provided in comments, adding text-shadow: 5em 0em 0em #999; #parent p:first-child gives desired effect. http://jsfiddle.net/ssacw/1/

i believe trying acheive same thing? please let me in details can update answer.

edit: since want rules apply every single child element, able think of: http://jsfiddle.net/ssacw/2/

use #parent p:nth-child(n) { text-shadow: 5em 0em 0em #999; }

hope helps :) there else constraint well?


Comments

Popular posts from this blog

PySide and Qt Properties: Connecting signals from Python to QML -

c# - DevExpress.Wpf.Grid.InfiniteGridSizeException was unhandled -

scala - 'wrong top statement declaration' when using slick in IntelliJ -