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

Universal pre-rendered styles are not correct #373

Closed
@cyrilletuzi

Description

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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