asciidoctor / asciidoctor-stylesheet-factory

!DEPRECATED! This was the utility project for producing the default stylesheet for the HTML converter in Asciidoctor. The source of the default stylesheet now lives in the main Asciidoctor repository.
Other
175 stars 87 forks source link

Create a plain.css #33

Closed haochenx closed 11 months ago

haochenx commented 8 years ago

I am trying to integrate AsciiDoctor with an existing website but found that without the AsciiDoctor stylesheet some elements are ugly and difficult to style. But using a theme found in this repository changes the styling too much so that the resulting page won't fit the style of the rest of the website.

Could we have a "plain" theme that doesn't change any styling (fonts, h1..h7 styling etc.) but makes AsciiDoc specific elements (e.g. admonitions, attributions in quote blocks etc.) display correctly?

Gitward commented 7 years ago

@mojavelinux There should be a simple stylesheet that only contains styles for the translated AsciiDoctor elements. Just a simple stylesheet that does not introduce another grid system,...

farleylai commented 6 years ago

I recently encountered a similar issue when migrating from one static website generator to another that does not override the default asciidoctor.css well for a custom theme. I suggest to separate essential structural styles from formatting styles. For example, the image position/alignment is essential for the layout but the background-color of the footer should be left to the website theme whether specified or not. Any followup idea is appreciated.

Kwpolska commented 6 years ago

I created issue asciidoctor/asciidoctor#2541 for the general problem of no stylesheet docs.

ggrossetie commented 6 years ago

It's not that easy to create a stylesheet that contains only styles that applies to Asciidoctor elements because for instance Asciidoctor is using ordered and unordered lists using ul and ol. We are also using dl and dt elements.

Since the default HTML5 converter is using an id we could use child selectors to avoid conflicts: https://github.com/asciidoctor/asciidoctor/blob/426d8389aa1706a589b66c96801542f587ae6b61/lib/asciidoctor/converter/html5.rb#L184-L186

In other words, Asciidoctor styles will only be applied in the <div id="content">.

This does not resolve the "consistency" issue though.

As suggested by @farleylai, we could separate essential structural styles from formatting styles but we need a clear definition of what is a structural style and what is a formatting style ? Is margin a structure style or a formatting style ? Text alignement is a structural style ?

Structural styles

Maybe it's easier to list which formatting style we do not want to apply:

mojavelinux commented 11 months ago

I'm in agreement that the new HTML5 converter should provide a bare-bones stylesheet as well as a ready-made one. That serves the purpose of giving a designer a starting point while giving a casual user something to go with right out of the box. However, I think that should be part of the new HTML5 converter effort. This repository is being archived.