Themes Version:
The look of the Sublime Text interface is controlled by themes. The termthemerefers strictly to the look of the UI – buttons, select lists, the sidebar,tabs and so forth. The highlighting of source code, markup and prose iscontrolled by acolor scheme.
The theme engine for Sublime Text is based on raster graphics. PNGs are used toprevent texture degradation and provide full alpha control. Each element in theUI can have up to four layers of textures or fills applied, with properties tocontrol opacity and padding. The properties set on each element can beconditionally changed based on user interaction and settings.
Sublime Text themes are implemented via the.sublime-theme format. It isa JSON format that specifies rules for matching elements and modifying theirappearance.
Format🔗
A.sublime-theme file contains a single JSON document. The documentshould bean object containing a key “rules” with the value of3179an array of rules.An optional key “variables” with an objectcontaining variable/value pairs may be added.3179
The following is an example of a.sublime-theme file, showing theformat. A complete theme will have many more rules to cover all elements used inthe UI.
[// Set up the textures for a button{"class":"button_control","layer0.tint":"#000","layer0.opacity":1.0,"layer1.texture":"Theme-Example/textures/button_background.png","layer1.inner_margin":4,"layer1.opacity":1.0,"layer2.texture":"Theme-Example/textures/button_highlight.png","layer2.inner_margin":4,"layer2.opacity":0.0,"content_margin":[4,8,4,8]},// Show the highlight texture when the button is hovered{"class":"button_control","attributes":["hover"],"layer2.opacity":1.0},// Basic text label style{"class":"label_control","fg":[240,240,240],"font.bold":true},// Brighten labels contained in a button on hover{"class":"label_control","parents":[{"class":"button_control","attributes":["hover"]}],"fg":[255,255,255]}]
Terminology🔗
The primary contents of a theme is an array ofrules. Eachrule objectcontains a"class" key used to match to an element. In addition to the"class", matching can be further restricted by specifying"attributes","settings","parents" and"platforms" keys.Properties affect thelook or behavior of the element.
- Variables allow reusing values throughout differentrules. Variables may
contain any type of syntax, but may only be referenced by top-level keysin arule.
Most elements have a single class name, although a few have more than one toallow for both generic, and specific styling. For example, thepopup_control class can be used to set styles for the auto complete andHTML popups, howeverpopup_controlauto_complete_popup may be used totarget just the auto complete popup. Multiple"class" values are separatedby a space. When a rule specified multiple class names, all must be present onthe element for the rule to be applied.
"attributes" are set by Sublime Text, and indicate the state of userinteraction, or other information about the nature of an element. The value isan array of strings. Examples include"hover","pressed"and"dirty".
"settings" uses values from.sublime-settings files to filter rules.This allowing theme authors to give users the ability to tweak a theme. Themesmay define their own settings, but there are a handful of “default” settingsthat should be supported if possible. SeeSettings for more details.
The value for the"settings" key may be one of:
array of strings
Each string is the name of boolean settings. To check for a
falsevalue, prefix the setting name with a!.Example:
["bold_folder_labels","!always_show_minimap_viewport"].object
Each key is the name of a setting. A value may be a boolean, string, or arrayof strings. If an array of strings is used, the setting will be matched ifany of the strings in the array matches the user’s value. When comparing to astring, the user’s setting will be coerced to an empty string when not set.
Example:
{"bold_folder_labels":true,"file_tab_style":"rounded"}.
The"parents" key is an array of objects specifying the"class" and"attributes" that must be matched in a parent element. Note that theparents must be ordered from furthest to closest parent.
The"platforms" key is an array of strings specifying the what operatingsystems to apply the rule to. Valid optionsinclude"osx","windows" and"linux".
Properties refer to all other keys in the JSON objects. Some properties areavailable on all elements, while others are specific to an individual element.
General Information🔗
The follow sections discuss information about images and how to specify styles.
Specificity🔗
Unlike CSS, a Sublime Text theme does not do specificity matching when applyingrules to elements. All rules are tested, in order, against each element.Subsequent rules that match will override properties from previous rules.
Texture Images🔗
All textures in a theme are specified using PNG images. Each texture should besaved at “normal” DPI, where each pixel in the file will be mapped to onedevice pixel. All file paths in the theme definition should reference thenormal DPI version.
A second version of each texture should also be included at double the DPI, with@2x added to the filename right before the extension. Sublime Text willautomatically use the@2x version when being displayed on a high-DPIscreen. :since:<It is also possible to specify@3x variants of textures forscreens running at 300% scale or higher <3167>>.
SVG images are not currently supported.
Dimensions🔗
Integer units in a theme referring to dimensions are always specified indevice-independent pixels (DIP). Sublime Text automatically handles scaling UIelements based on the screen density.
Padding & Margins🔗
Padding and margin may be specified in one of three ways:
A single integer value – the same value is applied to the left, top, right andbottom
An array of two integers – the first value is applied to the left and right,while the second value is applied to the top and bottom
An array of four integers – the values are applied, in order, to the left,top, right and bottom
Inheritance🔗
A theme may extend another theme, appending rules and overriding variables. Toextend a theme, add a top-level key"extends" to the JSON object, with astring value of the base theme.
{"extends":"Default.sublime-theme","rules":[{"class":"label_control","parents":[{"class":"button_control","attributes":["hover"]}],"fg":"red"}]}
The resulting list of rules will start with the base theme rules followed by theextending theme rules. Any variables from the extending theme will overridevariables with the same name in the base theme. Variable overrides will affectrules both in the base theme and the extending theme.
Variables🔗
Reusable variables may be defined by a JSON object under the top-level key"variables". Variable names are strings, however the value may be a string,number, boolean, array or object. Using a variable requires specifying a stringin the formatvar(example_variable_name).
{"variables":{"light_gray":"rgb(240, 240, 240)"},"rules":[{"class":"label_control","fg":"var(light_gray)"}]}
Variables may be used as the value for anyproperties, butthe variable must be the entire value, it may not be embedded within anothervariable. The only exception to this rule is that variables may be used as thebase color for the CSScolor() mod function.
Colors🔗
Colors may be specified by CSS or legacy color syntax:
CSS Color Syntax🔗
Since Sublime Text build 3177, colors in themes may now be specified using CSSsyntax, as supported byminihtml Reference. This includes support for hex,rgb(),hsl(), variables and the color mod function. Additionally, allPredefined Variables that are derived from the colorscheme are available for use.
The color white, as hex
#fff
The color white, usingrgb() functional notation
rgb(255,255,255)
50% opacity white, usinghsl() functional notation
hsla(0,100%,100%,0.5)
The closest color to red, as defined in the color scheme
var(--redish)
50% opacity of the closest color to red, as defined in the color scheme
color(var(--redish)a(0.5)
Legacy Color Syntax🔗
Prior to supporting CSS syntax for colors, themes were only able to specifycolors using the following formats, which are now deprecated.
RGB🔗
Colors in the RGB color space are specified via an array of 3 or 4 numbers, withthe first three being integers ranging from0 to255representing the components red, green and blue. The optional fourth number isa float ranging from0.0 to1.0 that controls the opacity ofthe color.
The color white, with full opacity
[255,255,255]
The color blue, with 50% opacity
[0,0,255,0.5]
HSL🔗
Colors may also be specified using the HSL color space by creating an array of 4elements, with the first being the string"hsl". The second element isan integer from0 to360 specifying the hue. The third is aninteger from0 to100 specifying the saturation, and the fourthis an integer from0 to100 specifying the lightness.
A dark magenta, with full opacity
["hsl",325,100,30]
A float from0.0 to1.0 may be added as a fifth element tocontrol the opacity.
A bright teal, with 50% opacity
["hsl",180,100,75,0.5]
Derived Colors🔗
It is also possible to derive colors from the current global color scheme.Colors in this format are specified using arrays with specific formats. In allcases, the first element is the base color, which maybe"foreground","background" or"accent".
Change Opacity of Base Color🔗
To change the opacity of a base color, specify an array of 2 elements, the firstbeing the base color name and the second being a float from0.0to1.0. The opacity will be set to the float value.
The color scheme foreground, at 90% opacity
["foreground",0.9]
De-saturate Base Color🔗
To de-saturate a base color, specify an array with 3 elements. The first is thename of the base color, the second is the string"grayscale", and thethird is an integer from0 to100 which specifies whatpercentage of the saturation (in HSL color space) of the existing color shouldbe retained. A value of100 means no change, whereas a valueof0 would cause the color to be completely de-saturated.
The color scheme foreground, with the saturation adjusted to 1/4 of theoriginal value.
["foreground","grayscale",25]
Tint Base Color🔗
5 and 6-element derived colors allow blending a color into the base color. A5-element colors uses an RGBA color, whereas a 6-element uses an HSLA. In bothcases, the last element, which normally represents the opacity, controls howmuch of the secondary color is blended into the base.
The color scheme background, lightened with white
["background",255,255,255,0.1]
The color scheme accent, tinted with dark red
["accent","hsl",0,100,30,0.2]
Colors derived from the color scheme will always be based on the global colorscheme, and will not reflect view-specific color schemes. Certain view-specificcontrols in the UI have tinting properties that allow using the view-specificcolor scheme colors.
Font Sizes🔗
Font sizes may be specified in the formats:
Numeric🔗
An integer or float to specify the size of the font in pixels.
Examples:12,13.5.
CSS Format🔗
A string of apx orrem CSS font size.
Examples:12px,1.`2rem
Therem size is based on the global settingfont_size for mostelements. Elements that use a different root font size will specify in thedescription.
Attributes🔗
Attributes are specified as an array of strings. Each string is an attributename. To check for the absence of an attribute, prepend a! to the name.
The following attributes are common to all elements:
hoverSet whenever the user’s mouse is hovered over an element.
Luminosity🔗
Although not available on all elements, many have attributes set based on theapproximate luminosity of the current color scheme. Most elements have theattributes set based on the global color scheme. Tabs and the tab background,however, have the attributes based on the color scheme specific to the selectedview.
The attributes are assigned based on theV value of the background color,when represented asHSV colors.
file_lightVfrom0.60-1.00
file_mediumVfrom0.30-0.59
file_medium_darkVfrom0.10-0.29
file_darkVfrom0.00-0.09
Settings🔗
Certain Sublime Text settings are design to influence the UI. Themes shouldrespect these settings and change elements based on them.
- "overlay_scroll_bars"🔗
This should affect the style of the scroll bars – generally they should besemi-transparent and the
overlayproperty of thescroll_area_controlshould be set totrue.
- "always_show_minimap_viewport"🔗
If the current viewport area should be highlighted on the minimap even whenthe user is not hovering over the minimap.
- "bold_folder_labels"🔗
If folder names in the side bar should have the
font.boldproperty set totrue.
- "mouse_wheel_switches_tabs"🔗
This is used to control mouse wheel behavior of tabs on Linux. It should becombined with checking for
!enable_tab_scrollingto change themouse_wheel_switchproperty of thetabset_controltofalse.
- "highlight_modified_tabs"🔗
If the tabs of modified files should be highlighted. This setting should bechecked in addition to the
dirtyattribute.
- "show_tab_close_buttons"🔗
If tabs should have close buttons.
- "inactive_sheet_dimming"🔗 4095
If sheets other than the one with the attribute
highlightedshould bevisually de-emphasized usingbackground_modifier.
Properties🔗
The"rules" key of a.sublime-theme file is a JSON array of ofobjects describing how UI elements should be styled. Every element in the UIsupports the following keys:
layer0.*The bottom-most texturelayer for the element.
layer1.*The second texturelayer for the element.
layer2.*The third texturelayer for the element.
layer3.*The fourth texturelayer for the element.
hit_test_levelA float value setting the required opacity of a pixel for a click to beconsidering a “hit”.
Layer Properties🔗
Every element in the UI supports up to four texture layers for displaying fillcolors and raster graphics. Each layer has dotted sub-keys in the formatlayer#.sub-key. Valid sub-keys include:
layer#.opacityA float value from
0.0to1.0that controls the masteropacity of the layer.Example:
0.9
layer#.tintAcolor value of a fill color to apply to the layer.
Example:
[255,0,0,127]
layer#.textureA string of the file path to a PNG image, relative to thePackages/folder.
Example:
"Theme-Default/arrow_right.png"
layer#.inner_marginTexture images are stretched to fit the element by slicing into a grid of 9using four lines. Seepadding & margins for valid formats with which tospecify the margin used to make the slices.
Example:
[5,2,5,2]
layer#.draw_centerA boolean that controls if the center rectangle of the 9-grid created via
layer#.inner_marginshould be drawn. This is an optimization thatallows skipping an unused section of texture.Example:
false
layer#.repeatA boolean that controls if the texture should be repeated instead ofstretched.
Example:
false
Value Animation🔗
Properties specified by floats may be animated over time. Instead of providing asingle numeric value, the animation is specified with an object includingdetails of the animation.Value animation is primarily useful for changingopacity over time. The object keys are:
targetA float value from
0.0to1.0that controls the destinationvalue.Example:
1.0
speedA float value of
1.0or greater that controls the relative length oftime the animation takes.Example:
1.5
interpolationAn optional string that allow specifying the use ofsmoothstep functioninstead of the defaultlinear function.
Default:
"linear"Example:
"smoothstep"
Texture Animation🔗
Thelayer#.texture sub-key may be an object to specify an animation based ontwo or more PNG images. The object keys are:
keyframesAn array of strings of the paths to PNG images, in order
Example:
["Theme-Default/spinner.png","Theme-Default/spinner1.png"]
loopAn optional boolean that controls if the animation should repeat
Default:
falseExample:
true
frame_timeAn optional float specifying how long each frame should bedisplayed.
1.0represents 1 second.Default:
0.0333(30 fps)Example:
0.0166(60 fps)
Texture Tinting Properties🔗
Certain elements have an available tint value set by the background of currentcolor scheme. The tint can be modified and applied to alayer#.textureimage.
tint_indexControls which layer the tint is applied to. Must be an integerfrom
0to3.
tint_modifierAn array of four integers in the range
0to255. The firstthree are blended into the RGB values from the tint color with the fourthvalue specifying how much of these RGB modifier values to apply.
Font Properties🔗
Certain textual elements allow setting the following font properties:
font.faceThe name of the font face.
font.sizeThefont size.
font.boldA boolean, if the font should be bold.
font.italicA boolean, if the font should be italic.
colorAcolor value to use for the text - the
fgproperty is analias for this for backwards compatibility.
shadow_colorAcolor value to use for the text shadow.
shadow_offsetA 2-element array containing the X and Y offsets of the shadow
opacity4073A float from
0.0to1.0that is multiplied against theopacity of thecolorandshadow_colorproperties.
Filter Label Properties🔗
Labels used in the quick panel have color control based on selection andmatching:
fgAcolor value for unselected, unmatched text.
match_fgAcolor value for unselected, matched text.
bgAcolor value for the background of an unselected row.
selected_fgAcolor value for selected, unmatched text.
selected_match_fgAcolor value for selected, matched text.
bgAcolor value for the background of a selected row.
font.faceThe name of the font face.
font.sizeThefont size.
Data Table Properties🔗
Row-based tables of data provide the following properties:
dark_contentIf the background is dark – used to set the
darkattribute forscrollbars.
row_paddingPadding added to each row, in one of the formats described inPadding &Margins.
Styled Label Properties🔗
Certain labels allow for additional control over their appearance. They supportthe properties:
border_colorAcolor value for the border of the label.
background_colorAcolor value for the background of the label.
Elements🔗
The following is an exhaustive list of the elements that comprise the SublimeText UI, along with supported attributes and properties:
Windows🔗
title_bar- Attributes
- Properties
fgAcolor value to use for the window title text –Mac 10.10or newer only.
bgAcolor value to use for the title bar background –Mac10.10 or newer only.
style4050The OS style to use for the titlebar -
"system","dark"(Mac/Linux only)or"light"(Mac only).Default:
"system"
windowThis element can not be styled directly, however it can be used in a
"parents"key. The luminosity attributes are set based on the globalcolor scheme.- Attributes
edit_windowThis element contains the main editor window, and is intended for use in a
"parents"key.
switch_project_windowThis element contains the Switch Project window, and is intended for use ina
"parents"key.
Side Bar🔗
sidebar_containerThe primary sidebar container that handles scrolling.
- Properties
content_marginThemargin around the
sidebar_tree.
sidebar_treeA tree control containing multiple
tree_rows.- Properties
indentAn integer amount to indent each level of the tree structure.
indent_offsetAn additional indent applied to every row, for the sake of positioning
disclosure_button_controlandclose_button.
indent_top_levelA boolean if top-level rows in the tree should be indented.
spacer_rowsA boolean controlling if a blank row should be added between theOpenFiles andFolders sections of the sidebar, when both are visible..
tree_rowA row may contain a header, open file, folder or file.
- Attributes
selectableWhen a row is selectable.
selectedWhen an selectable row is selected.
expandableWhen a row is expandable.
expandedWhen an expandable row is expanded.
sidebar_headingOne of the “Open Files”, “Group #” or “Folders” headings in the sidebar.
- Properties
case3179The case modification to use for the heading -
"upper","lower"or"title".Default:
"upper"
file_system_entry`3181The container holding information about a file or folder in the sidebar.Contains different controls based on which section of the sidebar it iswithin.
Within theOpen Files section, this control will contain a
sidebar_labelwith the file name, plus possibly avcs_status_badge.Within theFolders section, this control will contain a folder or fileicon (either
icon_folder,icon_folder_loading,icon_folder_duporicon_file_type), asidebar_labelwith the file or folder name,plus possibly avcs_status_badge.- Attributes
ignoredFiles: when a file is ignored.
Folders: when the entire folder is ignored.
untrackedFiles: when a file is new or not recognized.
Folders: when a folder contains one or more untracked files.
modifiedFiles: when a file has been changed on disk.
Folders: when a folder contains one or more modified files.
missingFolders: when one or more of a folder‘s files is no longer on disk.
addedFiles: when a new file has been newly added to the index.
Folders: when a folder contains one or more added files.
stagedFiles: when a modified file has been added to the index.
Folders: when a folder contains one or more staged files.
deletedFolders: when one or more of a folder‘s files has been added to theindex for removal.
unmergedFiles: when a file is in a conflict state and needs to be resolved.
Folders: when a folder contains one or more unmerged files.
- Properties
content_marginThemargin around the contained controls.
spacingAn integer number of pixels between each contained control.
sidebar_labelNames of open files, folder names and filenames.
- Properties
close_buttonA button to the left of each file in theOpen Files section.
- Properties
content_marginFor buttons, themargin specifies the dimensions.
disclosure_button_controlAn expand/collapse icon present in all
tree_rows that can be expanded- Properties
content_marginFor buttons, themargin specifies the dimensions.
icon_folderUsed for a folder once the contents have been fully enumerated.
- Properties
content_marginFor icons, themargin specifies the dimensions.
icon_folder_loadingUsed for a folder while the contents are being enumerated
- Properties
content_marginFor icons, themargin specifies the dimensions.
icon_folder_dupUsed for a folder that has been scanned previously in the sidebar.This isnecessary to prevent a possibly infinite list of files due to recursivesymlinks.
- Properties
content_marginFor icons, themargin specifies the dimensions.
icon_file_typeThe icon for a file. The
layer0.textureshould not be set since it isdetermined dynamically based on theiconsetting providedby.tmPreferences files.- Properties
content_marginFor icons, themargin specifies the dimensions.
vcs_status_badge3181An icon contained within
file_system_entrythat is used to display thestatus of a file or folder with regards to a Git repository it is containedin. This icon will only be shown if the settingshow_git_statusistrue, the file is contained within a Git repository, and thefile has some sort of special state within the repository.A file that isnot shown viagitstatusand is not ignored via a.gitignorerule will have no icon.- Attributes
ignoredFiles: when a file is ignored.
Folders: when the entire folder is ignored.
untrackedFiles: when a file is new or not recognized.
Folders: when a folder contains one or more untracked files.
modifiedFiles: when a file has been changed on disk.
Folders: when a folder contains one or more modified files.
missingFolders: when one or more of a folder‘s files is no longer on disk.
addedFiles: when a new file has been newly added to the index.
Folders: when a folder contains one or more added files.
stagedFiles: when a modified file has been added to the index.
Folders: when a folder contains one or more staged files.
deletedFolders: when one or more of a folder‘s files has been added to theindex for removal.
unmergedFiles: when a file is in a conflict state and needs to be resolved.
Folders: when a folder contains one or more unmerged files.
- Properties
content_marginFor icons, themargin specifies the dimensions.
Tabs🔗
tabset_control- Attributes
- Properties
content_marginThemargin around the
tab_controls.
tab_overlapHow many DIPs the tabs should overlap.
tab_widthDefault tab width when space is available.
tab_min_widthThe minimum tab width before tab scrolling occurs.
tab_heightThe height of the tabs in DIPs.
mouse_wheel_switchIf the mouse wheel should switch tabs – this should only be set to
trueif the settingenable_tab_scrollingisfalse.
tab_control- Attributes
dirtyWhen the associated view has unsaved changed.
addedWhen the associated view is for a new file.
modifiedWhen the associated view is for a modified file.
deletedWhen the associated view is for a file that has been deleted orotherwise no longer exists.
selectedWhen the associated view is the active view in its group.
transientWhen the associate view is a preview and not fully opened.
highlighted4050When the tab is for the sheet with input focus.
left4095When the tab is the left-most tab in the tabset.
right4095When the tab is the right-most tab in the tabset.
multiple4095When the tab is part of a sheet multi-selection.
left_of_selected4095When the tab is to the left of a selected tab.
left_of_hover4095When the tab is to the left of a hovered tab.
right_of_selected4095When the tab is to the right of a selected tab.
right_of_hover4095When the tab is to the right of a hovered tab.
left_overhang4095When the tab is overhanging to the left of its sheet, which can occurduring sheet multi-selection.
right_overhang4095When the tab is overhanging to the right of its sheet, which can occurduring sheet multi-selection.
- Properties
content_marginThemargin around the
tab_label.
max_margin_trimHow much of the left and right
content_marginmay be removed whentab space is extremely limited.
accent_tint_indexControls which layer the accent tint is applied to. Must be an integerfrom
0to3. The accent color is specified by the colorscheme.
accent_tint_modifierAn array of four integers in the range
0to255. Thefirst three are blended into the RGB values from the accent tint colorwith the fourth value specifying how much of these RGB modifier valuesto apply.
tab_label- Attributes
dirtyWhen the associated view has unsaved changed.
addedWhen the associated view is for a new file.
modifiedWhen the associated view is for a modified file.
deletedWhen the associated view is for a file that has been deleted orotherwise no longer exists.
transientWhen the associate view is a preview and not fully opened
- Properties
tab_close_button- Properties
content_marginFor buttons, themargin specifies the dimensions.
accent_tint_indexControls which layer the accent tint is applied to. Must be an integerfrom
0to3. The accent color is specified by the colorscheme.
accent_tint_modifierAn array of four integers in the range
0to255. Thefirst three are blended into the RGB values from the accent tint colorwith the fourth value specifying how much of these RGB modifier valuesto apply.
scroll_tabs_left_button- Properties
content_marginFor buttons, themargin specifies the dimensions.
scroll_tabs_right_button- Properties
content_marginFor buttons, themargin specifies the dimensions.
show_tabs_dropdown_button- Properties
content_marginFor buttons, themargin specifies the dimensions.
tab_connector4095- Attributes
left_overhangWhen the tab is overhanging to the left of its sheet, which can occurduring sheet multi-selection.
right_overhangWhen the tab is overhanging to the right of its sheet, which can occurduring sheet multi-selection.
- Properties
Quick Panel🔗
The quick panel is used for the various Goto functionality, the command paletteand is available for use by plugins.
overlay_controlThe container for the quick panel, including the input and data table.
- Specializations
To allow for targeting the
overlay_controlwhen the quick panelis being used for specific functionality, the following multi-classselectors are available:overlay_controlgoto_fileThe Goto File quick panel.
overlay_controlgoto_symbolThe Goto Symbol quick panel.
overlay_controlgoto_symbol_in_projectThe Goto Symbol in Project quick panel.
overlay_controlgoto_lineThe Goto Line quick panel.
overlay_controlgoto_wordThe Goto Anything quick panel, filtering by word.
overlay_controlcommand_paletteThe Command Palette.
4050- Properties
content_marginThemargin around the
quick_panel.
quick_panelThe data table displayed below the input. Normally the height is dynamic sothe layers will not be visible, however the Switch Project window will uselayers for the blank space below the filtered options.
- Properties
mini_quick_panel_rowA non-file row in
quick_panel. Contains onequick_panel_labelforeach line of text in the row.- Attributes
selectedWhen the row is selected.
quick_panel_rowA Goto Anything file row in
quick_panel. Also used in the Switch Projectwindow.Contains
quick_panel_labelwith the filename, andquick_panel_path_labelfor the file path.- Attributes
selectedWhen the row is selected.
quick_panel_entry4050A spacing-only container to control the spacing between
quick_panel_labelandquick_panel_path_labelcontrols when a rowhas one or more detail lines.- Properties
spacingAn integer number of pixels between each line of text,
kind_container4050A container shown to the left of the symbols in the Goto Symbol and GotoSymbol in Project quick panels. It contains the
kind_labeland is usedto indicate the kind of the symbol.This element is also used in
auto_completeto show the kind of the itembeing inserted. A"parents"key should be used to distinguish the twouses.The element
kind_containeris always paired with a second class nameindicating the general category the kind belongs to. The categories forusage in the quick panel are as follows:- Specializations
kind_containerkind_ambiguousWhen the kind of the item is unknown– no color.
kind_containerkind_keywordWhen the item is a keyword– typically pink.
kind_containerkind_typeWhen the item is a data type, class, struct, interface, enum, trait,etc– typically purple.
kind_containerkind_functionWhen the item is a function, method, constructor or subroutine–typically red.
kind_containerkind_namespaceWhen the item is a namespace or module– typically blue.
kind_containerkind_navigationWhen the item is a definition, label or section– typically yellow.
kind_containerkind_markupWhen the item is a markup component, including HTML tags and CSSselectors– typically orange.
kind_containerkind_variableWhen the item is a variable, member, attribute, constant or parameter–typically cyan.
kind_containerkind_snippetWhen the item is a snippet– typically green.
kind_containerkind_color_redishWhen the plugin author wants to display red.
kind_containerkind_color_orangishWhen the plugin author wants to display orange.
kind_containerkind_color_yellowishWhen the plugin author wants to display yellow.
kind_containerkind_color_greenishWhen the plugin author wants to display green.
kind_containerkind_color_cyanishWhen the plugin author wants to display cyan.
kind_containerkind_color_bluishWhen the plugin author wants to display blue.
kind_containerkind_color_purplishWhen the plugin author wants to display purple.
kind_containerkind_color_pinkishWhen the plugin author wants to display pink.
kind_containerkind_color_darkWhen the plugin author wants to display a dark background.
kind_containerkind_color_lightWhen the plugin author wants to display a light background.
- Properties
content_marginAmargin that is added around the
kind_label.
kind_label4050A label showing a single unicode character, contained within the
kind_container.This element is also used in
auto_completeto show the kind of the itembeing inserted. A"parents"key should be used to distinguish the twouses.- Properties
symbol_container4050A container around the
quick_panel_labelwhen showing the Goto Symbol orGoto Symbol in Project symbol lists.- Properties
content_marginAmargin that is added around the
quick_panel_label.
quick_panel_labelFilenames in
quick_panel_rowand all text inmini_quick_panel_row.- Properties
quick_panel_path_labelFile paths in
quick_panel_row.- Properties
quick_panel_labelkey_binding4073Key bindings show to the right-hand side of
quick_panel_row.- Properties
quick_panel_labelhint4073Annotations show to the right-hand side of
quick_panel_row.- Properties
quick_panel_detail_label4083Detail rows in
quick_panel_row.- Properties
colorAcolor value to use for the text.
link_colorAcolor value to use for links.
monospace_colorAcolor value to use for monospace text.
monospace_background_colorAcolor value to use for the background of monospace text.
Sheets🔗
sheet_contents4095A sheet can have text, image or HTML contents
- Attributes
highlighted4095When the sheet has input focus.
- Properties
background_modifierA string with a space-separated list of adjusters that are supported bythecolor() mod function. Used for implementinginactive sheet dimming.
Views🔗
text_area_controlThis element can not be styled directly since that is controlled by thecolor scheme, however it can be used in a
"parents"key.- Attributes
grid_layout_controlThe borders displayed between views when multiple groups are visible.
- Properties
border_colorAcolor value to use for the border.
border_sizeAn integer of the border size in DIPs.
minimap_controlControl over the display of the viewport projection on the minimap.
- Properties
viewport_colorAcolor value to fill the viewport projection with.
viewport_opacityA float from
0.0to1.0specifying the opacity of theviewport projection.
fold_button_controlCode folding buttons in the gutter.
- Attributes
expandedWhen a section of code is unfolded.
- Properties
content_marginFor buttons, themargin specifies the dimensions.
popup_shadow4075A wrapper around popup windows that allows controlling the shadow.
popup_controlhtml_popupThe primary container for the HTML popups used byShow Definitions andthird-party packages. The tint of the scroll bar will be set to thebackground color of the HTML document.
popup_controlannotation_popup4050The primary container for the annotations added to the right-hand side ofthe editor pane by build systems and third-party packages.
annotation_close_button4050The close button shown at the left edge of
annotation_popup.- Properties
content_marginFor buttons, themargin specifies the dimensions.
Auto Complete🔗
popup_controlauto_complete_popupThe primary container for the auto complete popup.
auto_completeThe data table for completion data. The tint is set based on the backgroundcolor of the color scheme applied to the view the popup is displayed in.
table_rowA row in
auto_complete.- Attributes
selectedWhen the user has highlighted a completion.
kind_container4050A container shown to the left of an auto complete item, which contains the
kind_labeland is used to indicate the kind of the item.This element is also used in the
quick_panelfor Goto Symbol and GotoSymbol in Project. A"parents"key should be used to distinguish the twouses.The element
kind_containeris always paired with a second class nameindicating the general category the kind belongs to. The categories forusage in the auto complete window are as follows:- Specializations
kind_containerkind_ambiguousWhen the kind of the item is unknown– no color.
kind_containerkind_keywordWhen the item is a keyword– typically pink.
kind_containerkind_typeWhen the item is a data type, class, struct, interface, enum, trait,etc– typically purple.
kind_containerkind_functionWhen the item is a function, method, constructor or subroutine–typically red.
kind_containerkind_namespaceWhen the item is a namespace or module– typically blue.
kind_containerkind_navigationWhen the item is a definition, label or section– typically yellow.
kind_containerkind_markupWhen the item is a markup component, including HTML tags and CSSselectors– typically orange.
kind_containerkind_variableWhen the item is a variable, member, attribute, constant or parameter–typically cyan.
kind_containerkind_snippetWhen the item is a snippet– typically green.
- Properties
content_marginAmargin that is added around the
kind_label.
kind_label4050A label showing a single unicode character, contained within the
kind_container.This element is also used in the
quick_panelfor Goto Symbol and GotoSymbol in Project. Aparentskey should be used to distinguish the twouses.- Properties
The
remroot font size is based on the font size of the editor controlthe auto complete window is being shown for.
trigger_container4050A container around the
auto_complete_label.- Properties
content_marginAmargin that is added around the
auto_complete_label.
auto_complete_labelText in a
table_row.- Properties
fg_blendA boolean controlling if the
fg,match_fg,selected_fg, andselected_match_fgvalues should be blended onto the foregroundcolor from the color scheme of the current view.
auto_complete_labelauto_complete_hint4073The “annotation” hint displayed at the right-hand-side of a
table_row.- Properties
The
remroot font size is based on the font size of the editorcontrol the auto complete window is being shown for.fg_blendA boolean controlling if the
colorvalue should be blended onto theforeground color from the color scheme of the current view.
auto_complete_detail_pane4050A detail pane displayed below the list of auto complete items, containingthe
auto_complete_infospacer, withauto_complete_kind_name_labelandauto_complete_detailsinside.- Properties
content_marginAmargin that is added around the child controls.
auto_complete_info4050Provides spacing between
auto_complete_kind_name_labelandauto_complete_details.- Properties
spacingAn integer number of pixels between each contained control.
auto_complete_kind_name_label4050A label used to display the name of the auto complete kind.
- Properties
The
remroot font size is based on the font size of the editorcontrol the auto complete window is being shown for.
auto_complete_details4050A single-line HTML control used to display the details of the auto completeitem.
- Properties
font.faceThe name of the font face.
font.sizeThefont size -the
remroot font size is based onthe font size of the editor control the auto complete window is beingshown for.
colorAcolor value to use for the text.
link_colorAcolor value to use for links.
monospace_colorAcolor value to use for monospace text.
monospace_background_colorAcolor value to use for the background of monospace text.
Panels🔗
panel_controlfind_panelThe container for the Find and Incremental Find panels.
- Properties
content_marginThemargin around the panel contents.
panel_controlreplace_panelThe container for the Replace panel.
- Properties
content_marginThemargin around the panel contents.
panel_controlfind_in_files_panelThe container for the Find in Files panel.
- Properties
content_marginThemargin around the panel contents.
panel_controlinput_panelThe container for the input panel, which is available via the API and usedfor things like file renaming.
- Properties
content_marginThemargin around the panel contents.
panel_controlconsole_panelThe container for the Console.
- Properties
content_marginThemargin around the panel contents.
panel_controloutput_panelThe container for the output panel, which is available via the API and usedfor build results.
- Properties
content_marginThemargin around the panel contents.
panel_controloutput_panelio_panelThe container for the output panel if it has been configured with an inputbox.
- Properties
content_marginThemargin around the panel contents.
panel_controlswitch_project_panelThe container for the input in the Switch Project window.
- Properties
content_marginThemargin around the panel contents.
panel_grid_controlThe layout grid used to position inputs on the various panels.
- Properties
inside_spacingAn integer padding to place between each cell of the grid.
outside_vspacingAn integer padding to place above and below the grid.
outside_hspacingAn integer padding to place to the left and right of the grid.
panel_close_buttonThe button to close the open panel
- Properties
content_marginFor buttons, themargin specifies the dimensions.
Status Bar🔗
status_bar- Attributes
panel_visibleWhen a panel is displayed above the status bar
- Properties
content_marginThemargin around the
sidebar_button_control,status_containerandstatus_buttonss.
panel_button_control<4050The panel switcher button on the left side of the status bar.
- Properties
content_marginFor buttons, themargin specifies the dimensions.
sidebar_button_control4050The sidebar/panel switcher button on the left side of the status bar.
- Properties
content_marginFor buttons, themargin specifies the dimensions.
status_containerThe area that contains the current status message.
- Properties
content_marginThemargin around the status message.
status_buttonThe status buttons that display, and allow changing, the indentation,syntax, encoding and line endings.
- Properties
content_marginFor buttons, themargin specifies the dimensions.
min_sizeAn array of two integers specifying the minimum width and height of abutton, in DIPs.
vcs_status3181The container holding the
vcs_branch_icon,label_controlwith thecurrent branch name, andvcs_changes_annotationcontrol.- Properties
content_marginThemargin around the contained controls.
spacingAn integer number of pixels between each contained control.
vcs_branch_icon3181An icon shown to the left of the current branch name.
- Properties
content_marginFor icons, themargin specifies the dimensions.
vcs_changes_annotation3181Displays the number of files that have been added, modified or deleted.
- Properties
Dialogs🔗
dialogThe Indexer Status and Update windows both use this class for the windowbackground.
progress_bar_controlThe progress bar container. The progress bar is displayed in the Updatewindow used for updates on Mac and Windows.
progress_gauge_controlThe bar representing the progress completed so far.
- Properties
content_marginThemargin specifies the height of the bar.
Scroll Bars🔗
scroll_area_controlThe scroll area contains the element being scrolled, along with the bar,track and puck.
- Attributes
scrollable3186When the control can be scrolled vertically.
hscrollable3186When the control can be scrolled horizontally.
- Properties
content_marginAmargin that is added around the content beingscrolled.
overlaySets the scroll bars to be rendered on top of the content.
left_shadowAcolor value to use when drawing a shadow to indicate thearea can be scrolled to the left.
left_shadow_sizeAn integer of the width of the shadow to draw when the area can bescrolled to the left.
top_shadowAcolor value to use when drawing a shadow to indicate thearea can be scrolled to the top.
top_shadow_sizeAn integer of the height of the shadow to draw when the area can bescrolled to the top.
right_shadowAcolor value to use when drawing a shadow to indicate thearea can be scrolled to the right.
right_shadow_sizeAn integer of the width of the shadow to draw when the area can bescrolled to the right.
bottom_shadowAcolor value to use when drawing a shadow to indicate thearea can be scrolled to the bottom.
bottom_shadow_sizeAn integer of the height of the shadow to draw when the area can bescrolled to the bottom.
scroll_bar_controlThe scroll bar contains the scroll track. The tint is set based on thebackground color of the element being scrolled.
- Attributes
darkWhen the scroll area content is dark, necessitating a light scroll bar.
horizontalWhen the scroll bar should be horizontal instead of vertical.
- Properties
content_marginAmargin that is added around the scroll track.
scroll_track_controlThe track that the puck runs along. The tint is set based on the backgroundcolor of the element being scrolled.
- Attributes
darkWhen the scroll area content is dark, necessitating a light scroll bar.
horizontalWhen the scroll bar should be horizontal instead of vertical.
- Properties
scroll_corner_controlThe dead space in the bottom right of a
scroll_area_controlwhen boththe vertical and horizontal scroll bars are being shown.- Attributes
darkWhen the scroll area content is dark, necessitating a light scroll bar.
- Properties
puck_controlThe scroll puck, or handle. The tint is set based on the background color ofthe element being scrolled.
- Attributes
darkWhen the scroll area content is dark, necessitating a light scroll bar.
horizontalWhen the scroll bar should be horizontal instead of vertical.
- Properties
Inputs🔗
text_line_controlThe text input used by the Quick Panel, Find, Replace, Find in Files andInput panels.
- Properties
content_marginThemargin around the text.
color_scheme_tintAcolor value to use to tint the background of the color scheme.
color_scheme_tint_2Acolor value to use to add a secondary tint to thebackground of the color scheme.
dropdown_button_controlThe button to close the open panel.
- Properties
content_marginFor buttons, themargin specifies the dimensions.
Buttons🔗
button_controlText buttons.
- Attributes
pressedSet when a button is pressed down.
disabledWhen the button won’t have any effect or is otherwise non functional.
- Properties
min_sizeAn array of two integers specifying the minimum width and height of abutton, in DIPs.
icon_button_groupA grid controlling the spacing of related icon buttons.
- Properties
no layer support
spacingAn integer number of pixels between each button in the group.
icon_button_control- Small icon-based buttons in the Find, Find in Files,
and Replace panels
- Attributes
selectedWhen an icon button is toggled on.
leftWhen the button is the left-most button in a group.
rightWhen the button is the right-most button in a group.
icon_regexThe button to enable regex mode in the Find, Find in Files and Replacepanels.
- Properties
content_marginFor icons, themargin specifies the dimensions.
icon_caseThe button to enable case-sensitive mode in the Find, Find in Files andReplace panels.
- Properties
content_marginFor icons, themargin specifies the dimensions.
icon_whole_wordThe button to enable whole-word mode in the Find, Find in Files and Replacepanels.
- Properties
content_marginFor icons, themargin specifies the dimensions.
icon_wrapThe button to enable search wrapping when using the Find and Replacepanels.
- Properties
content_marginFor icons, themargin specifies the dimensions.
icon_in_selectionThe button to only search in the selection when using the Find and Replacepanels.
- Properties
content_marginFor icons, themargin specifies the dimensions.
icon_highlightThe button to enable highlighting all matches in the Find and Replacepanels.
- Properties
content_marginFor icons, themargin specifies the dimensions.
icon_preserve_caseThe button to enable preserve-case mode when using the Replace panel.
- Properties
content_marginFor icons, themargin specifies the dimensions.
icon_contextThe button to show context around matches when using the Find in Filespanel.
- Properties
content_marginFor icons, themargin specifies the dimensions.
icon_use_bufferThe button to display results in a buffer, instead of an output panel, whenusing the Find in Files panel.
- Properties
content_marginFor icons, themargin specifies the dimensions.
icon_use_gitignore4073The button to toggle using.gitignore to filter files in the Find inFiles panel.
- Properties
content_marginFor icons, themargin specifies the dimensions.
Labels🔗
label_controlLabels are shown in the Find, Replace, Find in File and Input panels.Additionally, labels are used in the Update window, on textual buttons andfor the text in the
status_container.Targeting specific labels can be accomplished by using the
"parents"key.- Properties
title_label_controlThe title label is used in the About window.
- Properties
Tool Tips🔗
tool_tip_controlTool tips shown when hovering over tabs and buttons.
- Properties
content_marginThemargin around the tool tip text.
tool_tip_label_controlText shown in a tool tip
- Properties
Deprecated🔗
Color Values🔗
Before build 3127, the only way to specify opacity in colors was by using a4-element array containing all integers from0 to255. Thefourth element controlled the opacity, such that0 was fullytransparent and255 was fully opaque. The preferred format is now touse a float from0.0 to1.0.
Obsolete🔗
As the UI of Sublime Text has adapted over time, certain elements and propertiesare no longer applicable or supported.
Elements🔗
Thepanel_button_control element was removed from the status bar andreplaced bysidebar_button_control.
Thesheet_container_control element is never visible to users in recentversions of Sublime Text.
An element namedicon_reverse used to exist in the find panel to control ifsearching would move forward or backwards in the view. This is now controlledby theFind andFind Prev buttons.
The element namedquick_panel_score_label is no longer present in the GotoAnything quick panel.
Properties🔗
Theblur property used to be supported to blur the pixel data behind anelement, however it is not currently supported for implementation reasons.
Customization🔗
Users can customize a theme by creating a file with new rules that will beappended to the original theme definition.
To create a user-specific customization of a theme, create a new file with thesame filename as the theme, but save it in thePackages/User/directory.
For example, to customize the Default theme, create a filenamedPackages/User/Default.sublime-theme. Adding the following rulesto that file will increase the size of the text in the sidebar.
[{"class":"sidebar_heading","font.size":15,},{"class":"sidebar_label","font.size":14}]