does highlight beat shd?

D

David Thielen

We have a document with:
<w:highlight w:val="blue"/>
<w:shd w:val="clear" w:color="auto" w:fill="1E32DC"/>

And it displays with a blue background. What is the logic of what is
supposed to happen in this case?

1) Does shd not override highlight?

2) What does it mean when shd has clear, a color of auto, and a fill
color set to a specific amount?

thanks - dave

david@[email protected]
Windward Reports -- http://www.WindwardReports.com
me -- http://dave.thielen.com

Cubicle Wars - http://www.windwardreports.com/film.htm
 
C

Colbert Zhou [MSFT]

Hello Dave,

I quote the documentation from Standard ECMA-376
(http://www.ecma-international.org/publications/standards/Ecma-376.htm). It
is also avaliable from MSDN online library,
http://msdn.microsoft.com/en-us/library/documentformat.openxml.wordprocessin
g.highlight(office.14).aspx

"If this run has any background shading specified using the shd element,
then the background shading shall be superseded by the highlighting color
when the contents of this run are displayed.

Consider a run within a paragraph which has run shading applied as well as
yellow text highlighting using the highlight element. This formatting is
specified using the following WordprocessingML:
<w:rPr>
<w:highlight w:val="yellow" />
<w:shd w:themeFill="accent2" w:themeFillTint="66" />
</w:rPr>

The resulting run would have yellow highlighting visible over its contents,
as the highlighting supersedes the shading for the contents of the run.
"

This proves your guess. The highlight always beat the shd! As to the shd
value,
"
shd/val specifies the pattern which shall be used to lay the pattern color
over the background color for this paragraph shading.

[Example: Consider a shaded paragraph which uses a 10 percent foreground
fill, resulting in the following WordprocessingML:
<w:shd w:val="pct10" .../>
This shading val is pct10, indicating that the border style is a 10 percent
foreground fill mask. end example]
"
So the "clear" should be border style pattern instead of meaning it will
clear the highlight's effect.

Hope this helps and have a nice day! :) By the way, if I remember
correctly, it is quite close to your birthday. Let me represent my team to
say "Happy Birthday" to you, friend :)


Best regards,
Ji Zhou
Microsoft Online Support Team
 
D

David Thielen

Hello Dave,

I quote the documentation from Standard ECMA-376
(http://www.ecma-international.org/publications/standards/Ecma-376.htm). It
is also avaliable from MSDN online library,
http://msdn.microsoft.com/en-us/library/documentformat.openxml.wordprocessin
g.highlight(office.14).aspx

"If this run has any background shading specified using the shd element,
then the background shading shall be superseded by the highlighting color
when the contents of this run are displayed.

Consider a run within a paragraph which has run shading applied as well as
yellow text highlighting using the highlight element. This formatting is
specified using the following WordprocessingML:
<w:rPr>
<w:highlight w:val="yellow" />
<w:shd w:themeFill="accent2" w:themeFillTint="66" />
</w:rPr>

The resulting run would have yellow highlighting visible over its contents,
as the highlighting supersedes the shading for the contents of the run.
"

This proves your guess. The highlight always beat the shd! As to the shd
value,
"
shd/val specifies the pattern which shall be used to lay the pattern color
over the background color for this paragraph shading.

[Example: Consider a shaded paragraph which uses a 10 percent foreground
fill, resulting in the following WordprocessingML:
<w:shd w:val="pct10" .../>
This shading val is pct10, indicating that the border style is a 10 percent
foreground fill mask. end example]
"
So the "clear" should be border style pattern instead of meaning it will
clear the highlight's effect.

Hope this helps and have a nice day! :) By the way, if I remember
correctly, it is quite close to your birthday. Let me represent my team to
say "Happy Birthday" to you, friend :)

Wow - great memory. Yep, 9/26 is my birthday & I'm an old man :)

Thank you for the answer too - weird that it lists both.

thanks - dave

david@[email protected]
Windward Reports -- http://www.WindwardReports.com
me -- http://dave.thielen.com

Cubicle Wars - http://www.windwardreports.com/film.htm
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top