Javatpoint Logo
Javatpoint Logo

SASS MCQ

1) What is the correct full form of SASS?

  1. Syntactically Awesome Style Sheets
  2. Systematic Awesome Style Sheets
  3. Symbolic Asymmetric Style Sheets
  4. None of the above.

Answer: A is the correct option.

Explanation: The correct full form of SASS is Syntactically Awesome Style Sheets.


2) Who is the designer of SASS?

  1. James Gosling
  2. Hampton Catlin
  3. Guido van Rossum
  4. Misko Hevery

Answer: B is the correct option.

Explanation: Hampton Catlin is credited as the designer of SASS. SASS was developed by Natalie Weizenbaum and was designed by Hampton Catlin.


3) How many ways we can use Sass in our application?

  1. We can use Sass in our application as a command-line tool.
  2. We can use Sass in our application as a standalone Ruby module.
  3. We can use Sass in our application as a plugin for any Rack-enabled framework.
  4. All of the above.

Answer: D is the correct option

Explanation: As all of the above are the different ways to use Sass in the application.


4) Which of the following directive is used to share rules and relationships between selectors in SASS?

  1. @extend
  2. @media
  3. @extend
  4. None of the above

Answer: C is the correct option.

Explanation: The @extend directive is used to share rules and relationships between selectors in SASS. This directive extends all other class styles in one class and can also apply its specific styles.


5) Which of the following are the most attractive features of SASS?

  1. SASS is more stable, powerful, and fully compatible with CSS3.
  2. SASS is time-saving because it facilitates users to write CSS in less code.
  3. SASS uses its syntax.
  4. All of the above.

Answer: D is the correct option.

Explanation: All of the above are the attractive features of SASS.


6) Which of the following directive is used to set the style rule to different media types?

  1. @media
  2. @import
  3. @extend
  4. @debug

Answer: A is the correct option.

Explanation: The @media directive is used to set the style rule to different media types. Media queries look at the device's capability and can be used to check many things, such as the width and height of the viewport and device, orientation, resolution, and much more.


7) Which of the following is the main reason behind using SASS?

  1. SASS facilitates us to write codes easily and efficiently, and they are easy to maintain
  2. SASS is a pre-processing language that provides its syntax.
  3. SASS is a superset of CSS that contains all CSS features and is an open-source pre-processor coded in Ruby.
  4. All of the above.

Answer: D is the correct option.

Explanation: All of the above is the reason behind using SASS.


8) What are the key features of SASS?

  1. SASS is a CSS pre-processor with syntax advancements and an extension of CSS3.
  2. SASS has two syntaxes. The first syntax is "SCSS," and it uses the .scss extension.
  3. SASS supports language extensions such as nesting, variables, and mixins.
  4. All of the above.

Answer: D is the correct option.

Explanation: All of the above are the key features of SASS.


9) Which of the following directive is used to display the SassScript expression value as a fatal error?

  1. @error
  2. @warn
  3. @at-root
  4. None of the above.

Answer: A is the correct option.

Explanation: The @error directive is used to display the SassScript expression value as a fatal error.


10) What is the correct way to define a variable in SASS?

  1. $primary-color: #888
  2. @primary-color: #888
  3. %primary-color: #888
  4. #primary-color: #888

Answer: A is the correct option.


11) Which of the following directive facilitates you to generate styles in a loop?

  1. @while
  2. @if
  3. @for
  4. @each

Answer: C is the correct option.

Explanation: The @for directive facilitates us to generate styles in a loop. The @for directive comes in two forms. The first option is @for $var from <start> through <end> which starts at <start> and loops "through" each iteration and ends at <end>. The second option is @for $var from <start> to <end> which starts at <start> and loops through each iteration "to" <end> and stops. Once the directive reaches the <end>, it stops the looping process and does not evaluate the loop that one last time.


12) What is the usage of the @include directive in SASS?

  1. It is used to define the mixin.
  2. It is used to include the mixins in the document.
  3. It is used to include the media.
  4. None of the above.

Answer: B is the correct option.

Explanation: It is used to include the mixins in the document. The styles defined by the mixin can be included in the current rule.


13) What are the data types that SassScript supports?

  1. Numbers
  2. Strings of texts
  3. Colors
  4. All of the above

Answer: D is the correct option.

Explanation: All of the above data types are supported by SassScript.


14) In which of the following directive, a variable is defined that contains the value of each item in a list?

  1. @if
  2. @each
  3. @for
  4. @while

Answer: B is the correct option.

Explanation: In @each directive, a variable is defined that contains the value of each item in a list.


15) What is the use of @at-root directive in SASS?

  1. It is used to import the SASS or SCSS files. It directly takes the filename to import.
  2. It is used to set style rules for different media types.
  3. It is used to specify and share the rules and relationships between the selectors.
  4. It is specified as a collection of nested rules that can make style blocks at the root of the document.

Answer: D is the correct option.

Explanation: The @at-root directive in SASS is specified as a collection of nested rules that can make style blocks at the root of the document.


16) What is the use of the @return directive in SASS?

  1. The @return directive in SASS is used to define the mixin.
  2. It is used to include the mixins in the document.
  3. It is used to call the return value for the function.
  4. None of the above.

Answer: C is the correct option.

Explanation: In Sass, the @return directive is used to call the return value for the function.


17) Why is SASS considered better than LESS?

  1. SASS allows the users to write reusable methods and use logic statements, such as loops and conditions.
  2. SASS facilitates users to access Compass library and use some awesome features like dynamic sprite map generation, legacy browser hacks, and cross-browser support for CSS3 features.
  3. LESS facilities you to write a basic logic statement using a 'guarded mixin', equivalent to SASS if statements.
  4. All of the above.

Answer: D is the correct option.

Explanation: All of the above statements specify that SASS is better than LESS.


18) Which of the following operator provides the path for the CSS stylesheets in the application?

  1. :filename
  2. :load_paths
  3. :css_location
  4. :template_location

Answer: C is the correct option.

Explanation: The :css_location operator provides the path for the CSS stylesheets in the application.


19) Which of the following are types of mixin arguments?

  1. Keyword Arguments
  2. Variable Arguments
  3. Both of the above.
  4. None of the above.

Answer: C is the correct option.

Explanation: There are two types of mixin arguments: Keyword Arguments and Variable Arguments.


20) Why is SASS called a superset of CSS?

  1. SASS is called a superset of CSS because it contains all the features of CSS.
  2. SASS is called a superset of CSS because it is an open-source pre-processor written in the Ruby programming language.
  3. SASS is called a superset of CSS because it is better than CSS.
  4. None of the above.

Answer: A is the correct option.

Explanation: SASS is called a superset of CSS because it contains all the features of CSS.


21) What is Rack?

  1. Rack is a Web server interface.
  2. Rack is a Web framework.
  3. Rack is an application framework written in Ruby.
  4. None of the above.

Answer: A is the correct option.

Explanation: Rack is a web server interface that provides a minimal interface between webservers. It supports Ruby and Ruby's frameworks.


22) Which of the following is a web application framework that provides speed and modularity to Rails?

  1. Rails
  2. Merb
  3. Rack
  4. All of the above.

Answer: B is the correct option.

Explanation: Merb is a web application framework that provides speed and modularity to Rails. It is an MVC framework that is ORM-agnostic, JavaScript library agnostic, and template language agnostic.


23) Which of the following is an open-source server-side web application framework?

  1. Rails
  2. Merb
  3. Rack
  4. All of the above.

Answer: A is the correct option.

Explanation: Rails is an open-source server-side web application framework. It is written in Ruby and is a model-view-controller (MVC) framework, providing default structures for a database, a web service, and web pages.


24) Which of the following directive is used to detect the errors in SASS?

  1. @debug directive
  2. @warm directive
  3. @error directive
  4. @import directive

Answer: A is the correct option.

Explanation: The SASS @debug directive is used to detect the errors and display the Sass Script expressions values to the standard error output stream.


Next Topic#





Youtube For Videos Join Our Youtube Channel: Join Now

Feedback


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA