Share via


Format, CSS, Text Editor, Options Dialog Box

 

This dialog box makes it possible for you to change the default formatting settings for the CSS editor.

To access this dialog box

  1. In Microsoft Visual Web Developer, on the menu bar, choose Tools and then choose Options.

    The Options dialog box opens.

  2. In the left panel, expand the Text Editor node, expand the CSS node, and then choose Formatting.

    If you have configured your environment settings for Web development, the Text Editor element is not available unless you select the Show all settings check box. For more information about environment settings, see .ec70b520-a3e3-43c9-929b-bdc732cd2147

Note

Additional cascading style sheet (CSS) options can be found under the HTML Designer node, which is visible if the Show all settings check box is selected.

Tasks

UI Elements

The following UI elements are available in this dialog box. A Preview box is provided to show you an example of the results of your selections.

Style

  • Compact rules
    The selector and declaration are positioned on the same line, as shown in the following illustration:

    Style Sheet Compact Format

  • Semi-expanded
    The selector and initial brace ( { ) are positioned on the same line, declarations are indented on subsequent lines, and the closing brace ( } ) is aligned with the matching opening brace, as shown in the following illustration:

    CascadingStyleSheetSemiExpanded screenshot

  • Expanded
    The selector and initial brace each appear on their own lines, declarations are indented on subsequent lines, and the closing brace is aligned with the matching opening brace, as shown in the following illustration:

    Style Sheet Expanded Format

Color Picker

Use this option to specify how the color picker enters color values into style sheets. The Preview box shows examples of values for the relevant options. The default is Use Hex by default. Choose Disabled to disable the color picker.

  • If you have chosen hexadecimal, RGB, or HSL as the default and then change the opacity of a color in the editor, the color picker will enter values in RGBA or HSLA format. This is because there is no representation of opacity in the standard hexadecimal format.

  • If you modify an existing RGB or HSL color, its format will be preserved regardless of the default setting.

Indentation

Select Hierarchical indentation if you want the indentation of CSS rules to reflect their place in the CSS hierarchy. The Preview box shows how the CSS will look when you select or clear this option.

See Also

Tabs, CSS, Text Editor, Options Dialog Box
General, CSS, Text Editor, Options Dialog Box
Formatting, HTML, Text Editor, Options Dialog Box
CSS Editor