Hi all,

I have just installed Foundation theme in my Drupal 8 build.
After going through npm and bower I enabled theme and set it to default but it looks broken, looks like styles are missing (but nothing in Chrome Web Inspector).
The regions seem to be fine. Is there anything else to be done to make it look "pretty"?

It looks like that there are styles missing. I wonder if it's because it's an alpha release? Or I'm doing something wrong.

Thank you,
Deepcore

Comments

deepcore created an issue. See original summary.

jakubmroz’s picture

Issue summary: View changes
jakubmroz’s picture

jakubmroz’s picture

Issue summary: View changes
pifagor’s picture

Status: Active » Needs review

I understand that the theme looks so. At least there are styles can be seen on the button. Vibirite another topic

jakubmroz’s picture

Title: Problem with Foundation in Drupal 8 after installation » Site looks messy after switching to Foundation 6 Theme on Drupal 8
jakubmroz’s picture

Yes, partially. But the navigation doesn't work which is the main problem.

jakubmroz’s picture

Title: Site looks messy after switching to Foundation 6 Theme on Drupal 8 » Problem with main navigation styles on Foundation 6 Theme for Drupal 8
samuel.mortenson’s picture

Priority: Major » Normal
StatusFileSize
new486 bytes

@pifagor There's nothing to review here - please only use the "Needs review" status for patches that need review. You can review https://www.drupal.org/issue-queue/status#needs-review for documentation on the various status settings.

In response to the original issue - I think the only thing that could be changed here to improve the navigation styles is to apply the "menu" class to all menus by default. Other than that, this theme is meant to be minimal, which is why it looks so plain out of the box. We have very few custom styles in this theme, and the ones we do have only exist to fix bugs between Drupal core and Zurb Foundation styles.

I've created a patch which adds the "menu" class to all menus, let me know if this is an improvement.

Anonymous’s picture

I applied the patch and got the 'menu' class on all my menus. It's an improvement and it doesn't mess up the mimimalism of the base theme.

josephdpurcell’s picture

Status: Needs review » Needs work
StatusFileSize
new39.82 KB
new39.75 KB

I installed Drupal 8.2 and then installed the latest release of zurb_foundation, 8.x-6.x commit f50946017f08c276b6e58e7b3b389d864529cecb.

The menu is still bulleted list instead of a proper menu styled by Foundation's CSS. See the before and after screenshots for a comparison.

Setting to needs work. I am assuming the nav should look remotely similar to the Foundation Basic Nav: http://foundation.zurb.com/sites/docs/menu.html#basic-menu

samuel.mortenson’s picture

@josephdpurcell Did you try using the patch that was up for review in this issue, or did you just try the development branch?

Sorry, email didn't make it clear that you uploaded screenshots. I'll take a look.

samuel.mortenson’s picture

Status: Needs work » Needs review
StatusFileSize
new64.21 KB

@josephdpurcell Your screenshot contains four blocks, three of which are menus, which is why they are not displayed inline. You can confirm this by inspecting the HTML for the homepage and looking for the top-level tags above each menu. The only menu with more than one menu item, the account menu, is displayed inline as expected.

josephdpurcell’s picture

Hey @samuel.mortenson, thanks for pointing that out, I see that now. I've attached the HTML for the main nav if you want to take a look.

The steps I took to do this were installing Drupal 8.2 standard profile and then install Zurb Foundation theme. My expectation is that the site would look well formatted and cohesive out of the box, similar to how Bartik is, only more attractive because Foundation.

Is Foundation theme intended to look well formatted and cohesive out of the box?

josephdpurcell’s picture

This is the file I forgot to attach from #14.

samuel.mortenson’s picture

Is Foundation theme intended to look well formatted and cohesive out of the box?

No - Unlike many other Drupal themes, the Foundation theme has always been a base theme, and mostly exists to provide sane default templates and preprocess functions to enable sub-theme development. If any part of the theme conflicts with developing a sub-theme, or if the theme is setting bad Foundation classes/markup, then that should be fixed.

josephdpurcell’s picture

Status: Needs review » Reviewed & tested by the community

Aha! Ok, that's where I went wrong. Thank you for clarifying! And please ignore my previous comments regarding the overall look.

The hook looks good, and looking at the markup from #15 that I shared, it appears to comply with what Foundation recommends here: http://foundation.zurb.com/sites/docs/menu.html, which is each

    that is a menu has the "menu" class added to it.

    Setting to RTBC as I believe that meets the objective of the ticket.

  • samuel.mortenson committed b7738fc on 8.x-6.x
    Issue #2839596 by samuel.mortenson, josephdpurcell, deepcore: Problem...
samuel.mortenson’s picture

Status: Reviewed & tested by the community » Fixed

Thanks @josephdpurcell - I feel like that info could be documented better, but as I'm a co-maintainer I don't have a lot of access to the main project page. Committed!

Bcwald’s picture

This commit affects core's toolbar module menu, which breaks its styling by adding css flex to the list items. It should at the very least exclude OOTB toolbar module.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.