[pmwiki-users] Skin Creation?

Petko Yotov 5ko at 5ko.fr
Wed Jul 31 03:26:52 PDT 2019


On 29/07/2019 20:25, Monte Padget wrote:
> I'm working on a Skin idea. I want to format the paragraphs, <p></p>,
> separate from the background. I've discovered some paragraphs in the
> final markup of the HTML that have no visible content and are still
> getting the format causing some unwanted visuals.
> 
> Ex:
>  <p>
> <a id='trailstart'></a>
> </p>
> 
> Is there a way to force these paragraphs to contain a class type that
> can be used?

No. There may be a workaround but it is a lot of work. :-/

You may be able to style paragraphs without a class name with:

   p:not([class]), p[class=""]{
     color: blue;
   }
   p:empty{ /*not sure if we have these*/
     display:none;
   }

> To make it more complicated, there are some paragraphs that contain
> content that also have nothing to distinguish them.
> 
> Most of the paragraphs have a class type <p class='vspace'> which is 
> helpful.

These "vertical space" paragraphs are converted from a double linebreak 
in the wiki code.

Those that are not ".vspace" are usually immediately at the beginning, 
or after the end of another container (div, table, heading or other).

Those at the beginning could be styled with

   p:first-child {...} or more likely
   p:first-child:not([class]), p:first-child[class=""] { ... }

Those right after a heading could be styled with:

   h2 + p:not([class]), h2 + p[class=""] {}
   h3 + p:not([class]), h3 + p[class=""] {}

etc. for h1 to h6, table, div or other PmWiki:BlockMarkups .

Petko

-- 
If you upgrade :  http://www.pmwiki.org/Upgrades





More information about the pmwiki-users mailing list