calebjosue
Hello everybody!
So, I’ve created a simple app by means of mix phx.new emptyapp --no-ecto. Changed directory into emptyapp and modified the router at lib/emptyapp_web/router.ex by adding the following route.
live "/sayhi", SayHello in the root scope.
After I that, I created the say_hello.ex file in the following route lib/emptyapp_web/live/ with the following content:
defmodule EmptyappWeb.SayHello do
use Phoenix.LiveView
end
I’ve proceeded with the following file lib/emptyapp_web/live/say_hello.html.heex with the following content (plain html):
<h1>This is a header</h1>
<p>This is a Paragraph</p>
Run the server with mix phx.server and got the following result.
I was expecting to see an actual header in the traditional way, a little bit bigger than the paragraph. You know, as specified here.
So, how do you guys achieve this behavior in the Phoenix Framework?
Or is this approach unusual?
I also tried adding use MyemptyappWeb, :html with the same results.
Of course, in the end most HTML elements will end being styled by means of CSS, so basically my question is if these results are expected.
Thanks!
Trending in Questions
Other Trending Topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #library
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #ai
- #elixirconf-us
- #blog-post
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #elixirconf-eu
- #metaprogramming
- #hex












Showing Posts 1 to 4- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
Eiji
@calebjosue It’s “normal” for
Tailwindwhich is used inphoenixgenerators. For more information see Preflight - Tailwind CSS documentation.calebjosue
Outstanding, thanks for the link @Eiji !
Added some Tailwind classes and now looks decent.
Thanks a have a good night!
adw632
You might also find the tailwind
proseclass useful which is part of the tailwind typography plugin.Just add the prose plugin to tailwind configuration and prose works out of the box. There is no need for npm installation as the plugin is included by default in Phoenix.
calebjosue
How amazing is that?
Thanks for sharing that link @adw632 !