justinwalsh / daux.io

Daux.io is an documentation generator that uses a simple folder structure and Markdown files to create custom documentation on the fly. It helps you create great looking documentation in a developer friendly way.
daux.io
4.54k stars 526 forks source link

Major CSS issues #9

Closed alexrussell closed 11 years ago

alexrussell commented 11 years ago

I'm getting very weird layout issues (and this all on daux.io). I think this is related to some serious b0rkage in the CSS. For me (on a decently-wide monitor) the whole layout is weird. I had a little play in the inspector, and various odd things happen because you're attributing styles directly onto Bootstrap's own containers, rows and spans.

What got me onto writing this issue is that the GFM page was useless for me (the GFM page is a great example but not the only broken page - they all do this as far as I can tell). At mobile widths it's fine, at small desktop and tablet widths it's okay (a few subtle oddities), but at desktop widths (looks to be related to the media query for min-width: 1150px) lists go weird and code areas show outside of the page area. Sceenshots:

Mobile (normal): mobile

Tablet (normal): tablet

Desktop (b0rk): desktop

It looks like it may have something to do with floating. But there's plenty of other weird stuff going on here (the fork banner is one, the fact that some of the page content goes outside the scrollbar is another): (screenshot from tablet width)

tablet subtleties

The blue on the far right is the body background, somehow appearing outside the page content area, or is the scrollbar somehow coming inside the page? It also goes away when I make my browser a little bigger but still within the 'tablet' (or is it small desktop?) breakpoint. Anyway, this is obviously related to the bits overlaying the scrollbar referenced in issue #1

So I tried playing around with the CSS in the web inspector and found that, for instance, disabling the overflow: auto style from .content-area, .article-tree rule (compiled daux-navy.css line 6494) fixes some of this (and a lot more, see below), but then introduces other problems like the left-hand nav not scaling to the full browser height.


Basically I think you've customised Bootstrap too much. Applying extra styles to Bootstrap's own containers, rows and spans can certainly make things not work out quite right, and I think there's so much going on here it's hard to pin down exactly what's causing it (if it even is one thing).

Sorry this hasn't been a very optimistic bug report. Good luck!

chaseconey commented 11 years ago

I am definitely seeing the same kind of behavior. Another thing to add to this list of problems is that collapsible mobile navigation menu doesn't work at all. The 3 lined button is there, but it doesn't allow you to collapse the menu.

I messed around with the styles quite a bit and I failed to get everything to work, but I will keep at it, as I am very interested in this product.

garrett-moon commented 11 years ago

@alexrussell I will be pushing an update that will fix the bug on the third screenshot (Desktop (b0rk). The float view will never support pre tags inside of list elements, but I can at least make the code look more readable.

Regarding the CSS structure in general, the actual goal was to customize the traditional bootstrap DOM very little. If you remove the Daux.io theme, and add bootstrap.css, you should have a clean bootstrap (only) version to work with. While the base theme is a heavy customization, the DOM has very little manipulation. This allows for easy customization, as there are a lot of projects that already build on top of bootstrap. These projects should work perfectly with Daux.io if you disable the native theme. I am working with @justinwalsh on issuing a future update that would allow you to run Daux.io with only bootstrap enabled. I think this would help.

I also agree, the float layout is still a bit wonky, and probably always will be. It is a great looking, but "use at your own risk" type of feature.

I am working on a fix for the github banner and the scrollbar gap. This should be coming in the near future.

Thanks!

alexrussell commented 11 years ago

@garrett-moon so is the desktop version supposed to look like that (with the <pre> content outside the main content area? I suppose what I'm getting at is maybe that I don't quite understand the 'float layout' and what it's supposed to look like. I'm not entirely sure why quite so much is floated - presumably the idea would be to have left-hand nav and right-hand content?

I agree that being able to use it with a base standard Bootstrap stylesheet is great, but I do appreciate the effort you've put into customising it - Bootstrap's great but it is very samey. This looks pretty cool for docs, just also looks maybe a little over-engineered (but as I said, I don't know what it's supposed to look like).

garrett-moon commented 11 years ago

The float model is intentional. It is modeled somewhat after https://stripe.com/docs/api. I think we could use a better code example to show it off, though. Neither of our samples make good use of the feature and I will probably add some documentation to highlight how it works in the future.

As a note, it can always be removed, and it still looks great.

alexrussell commented 11 years ago

@garrett-moon my apologies then. I actually thought it was broken with all the code stuff hanging on the right-hand side (sorry about that!). Now I get it! And yes, I think a demonstration of the feature would make a lot more sense to people.

The ordered list stuff is presumably still considered broken though:

lists

Yes I'm aware you said that code/pre in lists is unlikely to be recoverable, but what about the simple multi-line lists (i.e. let's get crazy section)?

garrett-moon commented 11 years ago

No problem. I pushed a fixed for this about an hour ago. The float will never quite work when embedded in a list, but at least it will "fail" more gracefully now.

screenshot_7_15_13_5_38_pm

alexrussell commented 11 years ago

Excellent work :)