Skip to content

Background color of text: highlighting or shading? #79

@DynaSpan

Description

@DynaSpan

Currently, the implementation of background color on text is by using shading:

                        if (!colorValue.IsEmpty)
			{
				// change the way the background-color renders. It now uses Shading instead of Highlight.
				// Changes brought by Wude on http://html2openxml.codeplex.com/discussions/277570
				styleAttributes.Add(new Shading { Val = ShadingPatternValues.Clear, Fill = colorValue.ToHexString() });
			}

This makes sense if you're talking about table cell backgrounds etc. However, if your goal is to highlight text, users can become confused because in normal Word operations text is highlighted and not shaded.

My proposal is to implement a feature that checks if the color is applied on a span (meaning text; highlight) or on a different item, which would then shade it. I would like to know your opinions. If you agree, I will create a PR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions