Thursday, June 28, 2012

Re: VimL functions to determine spelling categories?

On Thursday, June 28, 2012 12:35:19 PM UTC-5, Benjamin R. Haskell wrote:
> > I have in the TOhtml TODO list, adding guisp highlighting. I'm not
> > exactly sure how I want to accomplish it though. It might be converted
> > to a dotted underline or something of the appropriate color.
>
> CSS3 is adding properties that will make it properly-possible¹. This
> is one way it will eventually work:
>
> .undercurl {
> text-decoration-line: underline;
> text-decoration-style: wavy;
> text-decoration-color: red;
> /* possibly also: */ text-underline-position: alphabetic;
> }
>
> Shorter:
>
> .undercurl {
> text-decoration: red wavy underline;
> }
>
> Firefox has vendor-prefixed CSS properties² for some of this already.
> The following worked for me (in FF) to simulate this Vim:
>
> .SpellBad {
> /* hi SpellBad gui=undercurl guisp=#ff0000 */
> -moz-text-decoration-line: underline;
> -moz-text-decoration-style: wavy;
> -moz-text-decoration-color: #ff0000;
> /* text-decoration: #ff0000 wavy underline; // not yet working, even with -moz- */
> }
>

Thanks for that, I was not aware of this CSS3 development. I'll probably use that, with a fallback to a dotted underline or bottom border for browsers which don't support it.

> --
> Best,
> Ben H
>
> ¹: text-decoration-style - http://www.w3.org/TR/css3-text/#text-decoration-style
>
> ²: http://peter.sh/experiments/vendor-prefixed-css-property-overview/

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments:

Post a Comment