# CSS

> For the complete documentation index, see [llms.txt](https://www.jetbrains.com/help/go/2026.3/llms.txt).

## Before you start

Make sure the  CSS plugin is enabled in the settings.  Press `Ctrl+Alt+S` (Windows), `⌘ Comma` (macOS), `⌘ Comma` (IntelliJ IDEA Classic (macOS)), `⌘ Comma` (macOS System Shortcuts), `Ctrl+Alt+S` (XWin), `Ctrl+Alt+S` (GNOME), `Ctrl+Alt+S` (KDE), `Ctrl+Alt+S` (Emacs), `Ctrl+Alt+S` (Sublime Text), `⌘ Comma` (Sublime Text (macOS)), `Ctrl+Comma` (VSCode), `⌘ Comma` (VSCode (macOS)) to open settings and then select `Plugins`.  In the search field, type CSS. For more information about plugins, refer to [Managing plugins](managing-plugins.html).

## Code completion

GoLand provides code completion for properties, their values, selectors, variables, and mixins.

Completion for CSS classes and ids is available in HTML files, in various types of templates (for example, in Angular or Vue.js), as well as in JSX code.

### Complete CSS class names in HTML tags

In HTML files, GoLand first suggests classes and ids from the `style` tag and files linked with `link` tags. If no matching results are found, GoLand also suggests symbols defined in all stylesheet files in the project.

From style block:

![Completion for a class defined within a style block](https://resources.jetbrains.com/help/img/idea/2026.3/ws_style_sheets_completion_search_scope_style_block.png)

From linked files:

![Completion for a class defined in a linked CSS file](https://resources.jetbrains.com/help/img/idea/2026.3/ws_style_sheets_completion_search_scope_linked_css_file.png)

From all stylesheet files in the project:

To see all classes and ids defined in the project straight away, before you start typing, press `Ctrl+Space` (Windows), `⌃ Space` (macOS), `⌃ Space` (IntelliJ IDEA Classic (macOS)), `⌃ Space` (macOS System Shortcuts), `Ctrl+Space` (XWin), `Ctrl+Space` (GNOME), `Ctrl+Space` (KDE), `Alt+/` (Emacs), `Ctrl+Space` (Sublime Text), `⌃ Space` (Sublime Text (macOS)), `Ctrl+I` (VSCode), `⌘ I` (VSCode (macOS)) twice.

### Complete CSS class names in template files

![Complete CSS class names in template files](https://resources.jetbrains.com/help/img/idea/2026.3/ws_css_complete_class_in_template.png)

### Complete CSS class names in JSX code

![Completion for CSS class names](https://resources.jetbrains.com/help/img/idea/2026.3/ws_react_classname.png)

### Complete CSS class names from external libraries

With GoLand, you can also get completion for class names from [Twitter Bootstrap](https://getbootstrap.com/) or other CSS libraries that are linked from a CDN in an HTML file without adding these libraries to your project dependencies.

Procedure:

1. Open the HTML file with a CDN link to an external CSS library. GoLand highlights the link.

2. To enable completion for the library, press `Alt+Enter` (Windows), `⌥ ⏎` (macOS), `⌥ ⏎` (IntelliJ IDEA Classic (macOS)), `⌥ ⏎` (macOS System Shortcuts), `Alt+Enter` (XWin), `Alt+Enter` (GNOME), `Alt+Enter` (KDE), `Alt+Enter` (Emacs), `Alt+Enter` (Sublime Text), `⌥ ⏎` (Sublime Text (macOS)), `Ctrl+.` (VSCode), `⌘ .` (VSCode (macOS)) on the link and select `Download library` from the list. Alternatively, hover over the link and click Download library.

### Full Line completion in CSS

GoLand provides [Full Line completion](full-line-code-completion.html) in CSS code.  The Full Line code completion feature uses a locally run deep learning model to suggest entire lines of code. It is available in GoLand  out of the box and does not require an additional license.

[Video](https://resources.jetbrains.com/help/img/idea/2026.3/ws_css_full_line_completion.mp4)

Procedure: Enable Full Line code completion in Style Sheets

1. Press `Ctrl+Alt+S` (Windows), `⌘ Comma` (macOS), `⌘ Comma` (IntelliJ IDEA Classic (macOS)), `⌘ Comma` (macOS System Shortcuts), `Ctrl+Alt+S` (XWin), `Ctrl+Alt+S` (GNOME), `Ctrl+Alt+S` (KDE), `Ctrl+Alt+S` (Emacs), `Ctrl+Alt+S` (Sublime Text), `⌘ Comma` (Sublime Text (macOS)), `Ctrl+Comma` (VSCode), `⌘ Comma` (VSCode (macOS)) to open settings and select Editor | General | Code Completion | Inline.

2. Select the  Enable inline completion using language models  checkbox and make sure the Local  option is selected.

3. If the model is not installed, click Download next to CSS-like first. For the full settings page, refer to [Full Line completion settings](full-line-code-completion.html#enable-full-line-code-completion).

Make sure that the CSS-like checkbox in the Display Suggestions for area is selected.

## Search and navigation

Procedure:

* To find usages of a Style Sheet symbol, place the caret at it and press `Alt+F7` (Windows), `⌥ F7` (macOS), `⌥ F7` (IntelliJ IDEA Classic (macOS)), `⌃ U` (macOS System Shortcuts), `Alt+F7` (XWin), `Alt+Shift+7` (GNOME), `Alt+Shift+7` (KDE), `Alt+F7` (Emacs), `Alt+F7` (Sublime Text), `⌥ F7` (Sublime Text (macOS)), `Alt+Shift+F12` (VSCode), `⌥ ⇧ F12` (VSCode (macOS)). Learn more from  [Search for usages in a project](find-highlight-usages.html#find-usages).

* To jump from a usage of a Style Sheet symbol to its definition, press `Ctrl+B` (Windows), `⌘ B` (macOS), `⌘ B` (IntelliJ IDEA Classic (macOS)), `⌘ B` (macOS System Shortcuts), `Ctrl+B` (XWin), `Ctrl+B` (GNOME), `Ctrl+B` (KDE), `Ctrl+Alt+G` (Emacs), `F12` (Sublime Text), `F12` (Sublime Text (macOS)), `F12` (VSCode), `F12` (VSCode (macOS)). Navigation to definition is available for classes, ids, selectors – including nested selectors and selectors with an ampersand `&` - as well as for variables and mixins.

Learn more from [Go to declaration](navigating-through-the-source-code.html#go_to_declaration).

## Documentation look-up

For properties and pseudo-elements, GoLand can show you a summary from the corresponding [MDN article](https://developer.mozilla.org/en-US/docs/Web/CSS). This summary is displayed in the Documentation popup which shows a brief description of the property and its values, as well as its [Web platform Baseline status](https://web.dev/baseline).

Widely available:

![Style sheets quick documentation: Baseline, widely available](https://resources.jetbrains.com/help/img/idea/2026.3/ws_css_quick_doc_compatibility.png)

Newly available:

![Style sheets quick documentation: Baseline, newly available](https://resources.jetbrains.com/help/img/idea/2026.3/ws_css_quick_doc_compatibility_newly_available.png)

Limited availability:

![Style sheets quick documentation: Baseline, limited availability](https://resources.jetbrains.com/help/img/idea/2026.3/ws_css_quick_doc_compatibility_limited.png)

For selectors, GoLand also shows their [specificity](https://www.w3.org/TR/selectors-3/#specificity).

![Documentation look-up: specificity fpr selectors](https://resources.jetbrains.com/help/img/idea/2026.3/ws_css_quick_doc_specificity.png)

Procedure: View documentation for a property

* Position the caret at the property and press `Ctrl+Q` (Windows), `F1` (macOS), `⌃ J` (IntelliJ IDEA Classic (macOS)), `⌘ I` (macOS System Shortcuts), `Ctrl+Q` (XWin), `Ctrl+Q` (GNOME), `Ctrl+Q` (KDE), `Ctrl+Q` (Emacs), `Ctrl+Q` (Sublime Text), `Ctrl+Q` (Sublime Text (macOS)), `Ctrl+K, Ctrl+I` (VSCode), `⌃ Middle-Click` (VSCode (macOS)) or select `View | Quick Documentation Lookup` from the main menu.

* When you hover over a property, GoLand immediately displays the reference for it in the  Documentation popup.

You can turn off this behavior or configure the popup to appear faster or slower, refer to [Configuring the
behavior of Documentation popup](#ws_documentation_lookup_configure_popup) below.

Procedure: Configure the behavior of the Documentation popup

* To turn off showing documentation automatically when you hover over code symbols, сlick ![the Show Options Menu icon](https://resources.jetbrains.com/help/img/idea/2026.3/app.actions.more.svg) in the popup and disable the Show on Mouse Move option.

* To have the Documentation popup shown faster or slower,   open the Settings dialog (`Ctrl+Alt+S` (Windows), `⌘ Comma` (macOS), `⌘ Comma` (IntelliJ IDEA Classic (macOS)), `⌘ Comma` (macOS System Shortcuts), `Ctrl+Alt+S` (XWin), `Ctrl+Alt+S` (GNOME), `Ctrl+Alt+S` (KDE), `Ctrl+Alt+S` (Emacs), `Ctrl+Alt+S` (Sublime Text), `⌘ Comma` (Sublime Text (macOS)), `Ctrl+Comma` (VSCode), `⌘ Comma` (VSCode (macOS))), go to `Editor | General | Code Completion | Popup`, then select the Show the documentation popup checkbox, and specify the delay time.

Procedure: Open the MDN documentation in the browser

* In the Documentation popup `Ctrl+Q` (Windows), `F1` (macOS), `⌃ J` (IntelliJ IDEA Classic (macOS)), `⌘ I` (macOS System Shortcuts), `Ctrl+Q` (XWin), `Ctrl+Q` (GNOME), `Ctrl+Q` (KDE), `Ctrl+Q` (Emacs), `Ctrl+Q` (Sublime Text), `Ctrl+Q` (Sublime Text (macOS)), `Ctrl+K, Ctrl+I` (VSCode), `⌃ Middle-Click` (VSCode (macOS)), click the link at the bottom.

* Press `Shift+F1` (Windows), `⇧ F1` (macOS), `⇧ F1` (IntelliJ IDEA Classic (macOS)), `⇧ F1` (macOS System Shortcuts), `Shift+F1` (XWin), `Shift+F1` (GNOME), `Shift+F1` (KDE), `Shift+F1` (Emacs), `Shift+F1` (Sublime Text), `⇧ F1` (Sublime Text (macOS)), `Shift+F1` (VSCode), `⇧ F1` (VSCode (macOS)) or select `View | External Documentation` from the main menu.

## Refactoring

With GoLand, you can convert expressions in Style Sheets into variables and introduce these variables using the `var(--var-name)` syntax in `.css` files or the `$` syntax in `.scss` and `.sass` files.

Procedure: Introduce variables

1. In the editor, place the caret at the expression to convert into a variable and press `Ctrl+Alt+V` (Windows), `⌘ ⌥ V` (macOS), `⌘ ⌥ V` (IntelliJ IDEA Classic (macOS)), `⌘ ⌥ V` (macOS System Shortcuts), `Ctrl+Alt+V` (XWin), `Ctrl+Alt+V` (GNOME), `Alt+Shift+V` (KDE), `Ctrl+Alt+V` (Emacs), `Ctrl+Alt+V` (Sublime Text), `Ctrl+Alt+V` (Sublime Text (macOS)), `Ctrl+Alt+V` (VSCode), `⌘ ⌥ V` (VSCode (macOS)) or select `Refactor | Introduce | Introduce Variable`  from the context menu or from the main menu.

2. If more than one occurrence of the selected expression is found, select Replace this occurrence only or Replace all occurrences from the Multiple occurrences found list.

3. For `.scss`, and `.sass`, select the global or  local  scope for the variable.

4. In the field with red borders, accept the suggested variable name or specify a custom name. Press `Enter` (Windows), `⏎` (macOS), `⏎` (IntelliJ IDEA Classic (macOS)), `⏎` (macOS System Shortcuts), `Enter` (XWin), `Enter` (GNOME), `Enter` (KDE), `Enter` (Emacs), `Enter` (Sublime Text), `⏎` (Sublime Text (macOS)), `Enter` (VSCode), `⏎` (VSCode (macOS)) when ready.

With GoLand, you can create new rulesets from existing declarations in CSS, SCSS, Sass, or Less files and even move entire rulesets between files using refactoring and intention actions.

Procedure: Introduce rulesets

1. Select the declarations to introduce. If you need only one declaration, just place the caret inside it.

2. Press `Alt+Enter` (Windows), `⌥ ⏎` (macOS), `⌥ ⏎` (IntelliJ IDEA Classic (macOS)), `⌥ ⏎` (macOS System Shortcuts), `Alt+Enter` (XWin), `Alt+Enter` (GNOME), `Alt+Enter` (KDE), `Alt+Enter` (Emacs), `Alt+Enter` (Sublime Text), `⌥ ⏎` (Sublime Text (macOS)), `Ctrl+.` (VSCode), `⌘ .` (VSCode (macOS)) and select Introduce ruleset from the list.

GoLand creates a new ruleset with the same selector and moves the selected declarations to it. If the selection contains comments, nested selectors, and so on, they are also moved to the new ruleset.

Procedure: Move rulesets to other files

1. Place the caret anywhere in the ruleset to move and press `F6` (Windows), `F6` (macOS), `F6` (IntelliJ IDEA Classic (macOS)), `⌘ ⌥ I` (macOS System Shortcuts), `F6` (XWin), `F6` (GNOME), `F6` (KDE), `F6` (Emacs), `F6` (Sublime Text), `F6` (Sublime Text (macOS)), `F6` (VSCode), `F6` (VSCode (macOS)).

2. In the dialog that opens, specify the file to move the ruleset to. If the specified file does not exist, GoLand will suggest creating it.

3. By default, GoLand automatically opens the file where the ruleset is moved. To change this behavior, clear the Open in editor checkbox.

Common refactorings, such as Copy, Move, or  Rename, are also available.

## Checking compatibility with browsers

Besides [looking up in the
documentation popup](#ws_css_documentation_lookup), you can check Style Sheet properties for compatibility with specific browsers on the fly. This inspection is based on the [MDN Browser
Compatibility Data](https://github.com/mdn/browser-compat-data) and shows you a warning every time a property is not supported in one of the targeted browsers.

![Style sheet compatibility inspection popup](https://resources.jetbrains.com/help/img/idea/2026.3/ws_css_documentation_lookup_check_compatibility_inspection_warning_popup.png)

Procedure: Turn on compatibility check

1. In the Settings dialog (`Ctrl+Alt+S` (Windows), `⌘ Comma` (macOS), `⌘ Comma` (IntelliJ IDEA Classic (macOS)), `⌘ Comma` (macOS System Shortcuts), `Ctrl+Alt+S` (XWin), `Ctrl+Alt+S` (GNOME), `Ctrl+Alt+S` (KDE), `Ctrl+Alt+S` (Emacs), `Ctrl+Alt+S` (Sublime Text), `⌘ Comma` (Sublime Text (macOS)), `Ctrl+Comma` (VSCode), `⌘ Comma` (VSCode (macOS))), go to `Editor | Inspections`.

2. Expand the CSS node and select the Property is incompatible with selected browsers. In the Options area, select the browsers you want to target and the minimum versions for them.

3. In the Options area, select the browsers to check the availability of properties against. Specify the target versions of the selected browsers.

![CSS compatibility inspection settings](https://resources.jetbrains.com/help/img/idea/2026.3/ws_css_documentation_lookup_check_compatibility_inspection_settings.png)

## Managing colors

GoLand provides support for [CSS color](https://www.w3.org/TR/css-color-5/) management, including [code completion](auto-completing-code.html), [quick
documentation lookup](null), and [color preview](#ws_css_change_color_values_use_preview). Coding assistance is provided for absolute, relative, and mixed colors.

![Coding assistance for color management](https://resources.jetbrains.com/help/img/idea/2026.3/ws_css_change_color_values_intro.png)

Procedure: Specify a color

* Place the caret at a `color` property, press `Ctrl+Space` (Windows), `⌃ Space` (macOS), `⌃ Space` (IntelliJ IDEA Classic (macOS)), `⌃ Space` (macOS System Shortcuts), `Ctrl+Space` (XWin), `Ctrl+Space` (GNOME), `Ctrl+Space` (KDE), `Alt+/` (Emacs), `Ctrl+Space` (Sublime Text), `⌃ Space` (Sublime Text (macOS)), `Ctrl+I` (VSCode), `⌘ I` (VSCode (macOS)), and then select the desired color value or choose color... to pick a custom one.

![Choosing a color](https://resources.jetbrains.com/help/img/idea/2026.3/ws_chooseColor.png)

* To use a code instead of a human-readable color name, press `Alt+Enter` (Windows), `⌥ ⏎` (macOS), `⌥ ⏎` (IntelliJ IDEA Classic (macOS)), `⌥ ⏎` (macOS System Shortcuts), `Alt+Enter` (XWin), `Alt+Enter` (GNOME), `Alt+Enter` (KDE), `Alt+Enter` (Emacs), `Alt+Enter` (Sublime Text), `⌥ ⏎` (Sublime Text (macOS)), `Ctrl+.` (VSCode), `⌘ .` (VSCode (macOS)) and select Convert color to <color code system> from the list, where <color code system> is [HEX](https://www.w3schools.com/colors/colors_hexadecimal.asp), [HSL](https://www.w3schools.com/colors/colors_hsl.asp), [HWB](https://www.w3schools.com/colors/colors_hwb.asp), [RGB](https://www.w3schools.com/colors/colors_rgb.asp), [lch](https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Values/color_value/lch), [oklch](https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Values/color_value/oklch), or [oklab](https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Values/color_value/oklab).

![Use code instead of color name](https://resources.jetbrains.com/help/img/idea/2026.3/chooseColor.png)

Procedure: Change color

* Click a color icon in the gutter and pick the desired color in the popup.

![Picking a color](https://resources.jetbrains.com/help/img/idea/2026.3/ws_colorPicker.png)

* Alternatively, place the caret at a color property, press `Alt+Enter` (Windows), `⌥ ⏎` (macOS), `⌥ ⏎` (IntelliJ IDEA Classic (macOS)), `⌥ ⏎` (macOS System Shortcuts), `Alt+Enter` (XWin), `Alt+Enter` (GNOME), `Alt+Enter` (KDE), `Alt+Enter` (Emacs), `Alt+Enter` (Sublime Text), `⌥ ⏎` (Sublime Text (macOS)), `Ctrl+.` (VSCode), `⌘ .` (VSCode (macOS)), select Change color from the list, and then pick the desired color in the popup.

![Change color - context menu](https://resources.jetbrains.com/help/img/idea/2026.3/ws_css_change_color_values_change_color_context_action.png)

Procedure: Toggle color preview

GoLand shows preview for absolute, relative, and mixed colors.

![Color preview intro](https://resources.jetbrains.com/help/img/idea/2026.3/ws_css_change_color_values_use_preview.png)

* By default, GoLand displays color preview as icons in the gutter. To show color preview in the background,   open the Settings dialog (`Ctrl+Alt+S` (Windows), `⌘ Comma` (macOS), `⌘ Comma` (IntelliJ IDEA Classic (macOS)), `⌘ Comma` (macOS System Shortcuts), `Ctrl+Alt+S` (XWin), `Ctrl+Alt+S` (GNOME), `Ctrl+Alt+S` (KDE), `Ctrl+Alt+S` (Emacs), `Ctrl+Alt+S` (Sublime Text), `⌘ Comma` (Sublime Text (macOS)), `Ctrl+Comma` (VSCode), `⌘ Comma` (VSCode (macOS))), go to `Editor | Appearance` and select the Show CSS color preview as background checkbox.

![Show color preview in the background](https://resources.jetbrains.com/help/img/idea/2026.3/colorPreview_background.png)

* To restore the color preview gutter icons,   open the Settings dialog (`Ctrl+Alt+S` (Windows), `⌘ Comma` (macOS), `⌘ Comma` (IntelliJ IDEA Classic (macOS)), `⌘ Comma` (macOS System Shortcuts), `Ctrl+Alt+S` (XWin), `Ctrl+Alt+S` (GNOME), `Ctrl+Alt+S` (KDE), `Ctrl+Alt+S` (Emacs), `Ctrl+Alt+S` (Sublime Text), `⌘ Comma` (Sublime Text (macOS)), `Ctrl+Comma` (VSCode), `⌘ Comma` (VSCode (macOS))), go to `Editor | General | Gutter Icons` and select the Color preview checkbox in the Common area.

![Enable color preview in the gutter](https://resources.jetbrains.com/help/img/idea/2026.3/colorPreview.png)

## Viewing the styles applied to a tag

In HTML and XHTML files, GoLand can show you all the styles applied to an arbitrary tag.

Procedure:

* From the context menu of a tag, select `Show Applied Styles for Tag`.

GoLand opens the CSS Styles tool window with two panes, the left-hand pane shows the styles for the tag and the right-hand pane shows their definitions. For each tag, GoLand opens a separate tab.

From the tool window, you can navigate to tags and definitions of properties in your source code.

* To jump to the tag, click ![the Navigate to Tag toolbar button](https://resources.jetbrains.com/help/img/idea/2026.3/app.actions.preview.svg) on the toolbar of the left-hand pane.

* To jump to the definition of a property, select it in the left-hand pane and click ![the Navigate to Style Sources button](https://resources.jetbrains.com/help/img/idea/2026.3/app.actions.preview.svg) on the toolbar of the right-hand pane.

## Configuring syntax highlighting

You can configure CSS-aware syntax highlighting according to your preferences and habits.

Procedure:

1. In the Settings dialog (`Ctrl+Alt+S` (Windows), `⌘ Comma` (macOS), `⌘ Comma` (IntelliJ IDEA Classic (macOS)), `⌘ Comma` (macOS System Shortcuts), `Ctrl+Alt+S` (XWin), `Ctrl+Alt+S` (GNOME), `Ctrl+Alt+S` (KDE), `Ctrl+Alt+S` (Emacs), `Ctrl+Alt+S` (Sublime Text), `⌘ Comma` (Sublime Text (macOS)), `Ctrl+Comma` (VSCode), `⌘ Comma` (VSCode (macOS))), go to `Editor | Color Scheme | CSS`.

2. Select the color scheme, accept the highlighting settings inherited from the defaults or customize them as described in [Colors and fonts](configuring-colors-and-fonts.html).

