Kulestar / powerui

PowerUI, the HTML UI framework for Unity.
138 stars 32 forks source link

why does google looks so strange? #17

Open SimonF89 opened 5 years ago

SimonF89 commented 5 years ago

why does google looks so strange in PowerUI? Same with other websites.. they look like not all css information get loaded.

What iam doing wrong?

Bablakeluke commented 5 years ago

PowerUI isn't a web browser - it's not strictly designed to browse the web. Instead it is a very broad implementation of web standards inside Unity in order to have very tightly integrated UI functionality written in HTML/ CSS for all Unity platforms. Check out more info about why PowerUI is designed like that here.

If you're specifically after a web browser, then the best thing to do is try and embed one. This isn't supported on all Unity platforms, but projects like embedded browser works well for desktop builds.

But to more directly answer the question, the big thing that causes odd layout is that flexbox isn't supported by PowerUI at the moment (and Google uses it quite a bit).

SimonF89 commented 5 years ago

Something like that doesnt works too... So there are more css functions which not works. Is there a way to get a nice nav-bar in powerUI?

https://www.w3schools.com/css/tryit.asp?filename=trycss_navbar_horizontal_responsive

philfleck commented 5 years ago

Hi, i also read the issue. Basically no everything from the css and js world is supported. We use is as extendable and outsourceable ui, which can easily be hotplugged. What you have to consider is how to range elements and apply your css. Most web-dev libs i tried, are just partly supported. Our nav-bar consist of icons and a down arrows. which is shown with custom js by switching display to none. also the animations are working.

hope that helps somehow.

anyway, bottom line, there some limitations, but it is still the best solution so far and its well written.

@Bablakeluke how about the SVG? ;)

Bablakeluke commented 5 years ago

@philfleck there's some basic support for SVG currently built in - it currently doesn't deal with transforms properly and also did have some issues on Apple hardware as the custom made SVG library renders all SVGs entirely on the GPU via Loonim. SVG is something that comes up every so often so I'm definitely planning on finishing support for it soon :)