I wanted to generate scaffold without stylesheets, and I found these two flags: --skip-stylesheets
, --no-stylesheets
. What's the difference between them?
There are three types of CSS which are given below: Inline CSS. Internal or Embedded CSS. External CSS.
We learned that style sheets come in three types, external, internal, and inline.
Internal CSS are the ones that we can write within the same file i.e the HTML code and CSS code are placed in the same file. External CSS are that we can write in a separate file than the html code i.e the HTML file is separate like(index. html) and CSS file is separate like(style. css).
A style sheet is a file which tells a browser how to render a page. There are even aural style sheets [coming up -1997] for telling a speech browser how to pronounce different tags. A current recommendation for style sheets is the "Cascading Style Sheets" (CSS) language.
If you run rails g scaffold --help
, it will show help information for that generator along with a list of options.
Some of the options have default values. For example, if you look at
-y, [--stylesheets] # Generate Stylesheets
# Default: true
You see it defaults to true. If you don't want to generate stylesheets, you can prefix the option with --no
to disable that specific option.
The skip-stylesheets
option is defined in the [Runtime options] section as follows:
-s, [--skip] # Skip files that already exist
So to answer your question:
--no-stylesheets
doesn't generate stylesheets at all
--skip-stylesheets
generates stylesheets but skips the ones that already exist.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With