Skip to content
This repository was archived by the owner on Jan 6, 2025. It is now read-only.
This repository was archived by the owner on Jan 6, 2025. It is now read-only.

Universal pre-rendered styles are not correct #373

@cyrilletuzi

Description

@cyrilletuzi

With last nightly build, there are no more blocking errors with Flex Layout in Universal, but the pre-rendered styles are not correct.

Repro :

  • git clone https://github.com/cyrilletuzi/nguniversal-expressengine-httpinterceptor.git
  • git checkout -b flexlayoutissue
  • npm install
  • npm start
  • go to localhost:3000 : rendered correctly with JavaScript (vertical in small screens, horizontal in desktop screens with 3 stretched items by row)
  • disable JavaScript to test what the server is pre-rendering and refresh : not rendered correctly (horizontal with the 4 items on the same line, on all screen sizes)

The only flex relative code is in src/app/app.component (the other files are just Universal boilerplate, and innerHTML is just to quickly test different heights) :

<div fxLayout.xs="column" fxLayoutWrap.xs="nowrap">
  <div class="test" fxFlex.gt-xs="calc(100% / 3)" *ngFor="let item of list" [innerHTML]="item"></div>
</div>

Javascript-Enabled:

Mobile Viewport

screen shot 2017-08-09 at 10 53 16 am

Desktop Viewport

screen shot 2017-08-09 at 10 24 07 am


Javscript-Disabled (prerender version only):

Mobile Viewport

screen shot 2017-08-09 at 10 53 01 am

Desktop Viewport

screen shot 2017-08-09 at 10 29 35 am

Metadata

Metadata

Assignees

Labels

P1Urgent issue that should be resolved before the next re-leasehas prA PR has been created to address this issuessr

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions