Modern browses + CSS Examples

https://developer.chrome.com/blog/inside-browser-part1

https://developer.chrome.com/docs/webstore


Animation
https://developer.chrome.com/blog/loaf-has-shipped?hl=en

chrome theme reference

https://docs.google.com/document/d/1jt9vdUY9O5IMm6Zoi2Kz0LWFfFZpvP69qjy6PoGsEoA/edit

Chrome Theme Reference

This guide was made with Windows XP and Chrome 6.0.453.1.

Anything that has a dark red background like this was correct in the old guide but seems to no longer be the same or is just acting funny with this release.

img

Image Elements

Image elements are defined under the "images" section in the manifest.json file.

NumberElement manifest.json NotationDescriptionRecommended Size (WxH)Repeats
1Frame"theme_frame"The frame of the chrome browser/the area that is behind the tabs.Height – 41min to cover behind tabs, usually around 100 ?Horizontal
1.1Frame"theme_frame_inactive"The same area as above, only that this represents the inactive state.∞ x 41, check frame ?Horizontal
1.2Frame"theme_frame_incognito"The same area under the incognito mode, when the window is active∞ x 41, check frame ?Horizontal
1.3Frame"theme_frame_incognito_inactive"The same area but in the incognito mode, when the window is inactive. ∞ x 41, check frame ?Horizontal
0.0Frame"theme_frame_overlay"This is the image that appears at the top left and over the frameCan be anything, check frameNone
0.0Frame"theme_frame_overlay_inactive"Same as above but displayed when window is inactiveCan be anything, check frameNone
2Tabs"theme_tab_background"This is the area that covers the tabs that are not activeHeight – At least 26 ?Horizontal
2.1Tabs"theme_tab_background_incognito"The same thing as above, but used for the incognito modeHeight – At least 26 ?Horizontal
2.2Tabs"theme_tab_background_v"(Not yet confirmed) The tab background for something!Height – At least 26 ?Horizontal
3Toolbar"theme_toolbar"This represents both the current tab and the toolbar together∞ x 120 ?Horizontal & Vertical
4Buttons"theme_button_background"This is the area that covers the toolbar buttons29 x 27Horizontal & Vertical
5NTP"theme_ntp_background"This is the theme's inner background-the large white space is covered by thisRecommended Minimum Size for images 800 x 600Specified in ntp_background_repeat
0.0NTP"theme_ntp_attribution"This is the image that will be displayed in the 'theme created by' section
6Controls"theme_window_control_background"The background for the window control buttons (close, maximize, etc.,)Height – around 17 ?Horizontal & Vertical

Color Elements

Color elements are defined under the "colors" section in the manifest.json file.

Colors are entered as RGB values, some elements can contain opacity value also. e.g. "ntp_section" : [15, 15, 15, 0.6]

Number Elementmanifest.json NotationDescription
10Frame"frame"The color of the frame, that covers the smaller outer frame
10.1Frame"frame_inactive"The color of the same element, but in inactive mode
10.2Frame"frame_incognito"The color of the same element, but in incognito mode
10.3Frame"frame_incognito_inactive"The color of the same element, but in incognito, inactive mode
11Tabs"tab_text"The color of text, in the title of current tab
12Tabs"tab_background_text"The color of text, in the title of all inactive tabs
13Toolbar"toolbar"The color of the toolbar background (visible by pressing Ctrl+B)
14Buttons"button_background"The background color of all the toolbar buttons
15Bookmarks"bookmark_text"The color of the bookmark element's text
16NTP"ntp_background"The theme's inner background color
17NTP"ntp_text"The color of all the text that comes in the inner background area
18NTP"ntp_link"The color of the links that appear in the background area
19NTP"ntp_link_underline"The color of the underline of all links in the background area
20NTP"ntp_header"The color of the section frames when mouse over
21NTP"ntp_section"The color of Recently closed tabs area's bg and frame of quick links
0NTP"ntp_section_text"The color of text in the section
0NTP"ntp_section_link"The color of the links that appear in the section area
0NTP"ntp_section_link_underline"The color of underline of links in the section area
0Controls"control_background"Unconfirmed yet-The color of the window control buttons (close, maximize, etc.)

Tint Elements

Tint elements change the hue, saturation and luminance of images.

Tint elements come under the "tints" section in the manifest.json file.

Number Elementmanifest.json NotationDescription
1Frame"frame"The color tint that can be applied to the frame of chrome
1.1Frame"frame_inactive"The color tint that is applied when the chrome window is inactive
1.2Frame"frame_incognito"The color tint to the frame-in incognito mode
1.3Frame"frame_incognito_inactive"Same as above, but when the window is inactive (and in incognito mode)
2Tabs"background_tab"The color tint of the inactive tabs in incognito mode
4Buttons"buttons"The color tint that can be applied to various buttons in chrome

NTP Property Elements

Property elements come under the "properties" section in the manifest.json file.

Number manifest.json NotationDescription
0.0"ntp_background_alignment"The property that tells the alignment of the inner background image
0.0"ntp_background_repeat"This property specifies if the above background should be repeated
0.0"ntp_logo_alternate"This lets you select the type of google chrome header you want

These are the elements that google chrome allows a user to theme, but it's the user's wish to decide what elements are going to be edited. The things that you don't need changed can be left alone (in case of which those elements will have their default value/image). Remember that each element goes into it's own section in the manifest file – color elements should be listed under "colors", image elements under "images" and so on.

Images

  • theme_frame img

"theme_frame" : "images/frame.png"

This is an image, this image represents the area behind the tabs. There is no strict dimensions for this image, the rest of the area in the frame that is not covered by this image is covered by the color element frame. It would be helpful to know that this image by default repeats along the x-axis. Hence if you create a small square image, it will be automatically repeated along x-axis-which means you can create patterns if you use short sized images.

Remember this image doesn't repeat along-y, hence make sure it is long enough to cover the toolbar area-anything over 80px height is good, usually with grading alpha transparency at the bottom so that the image blends with the "frame" color. You can create a large sized frame image, that extends and covers the frame borders too.

Else you might see a small separation to the extreme top left of the frame, when the window is in restored mode due to the wrong size of the image.

Alternatively one can decide to create an image with loooong width-long enough that the image repetition is not seen-this method allows you to create one continuous design for the frame-but this method might slow down the loading time of the theme since large resolution screens require image of larger width (or else you'll see the repetition of the image). Note that if you don't include this image, the default frame of chrome-the blue one is displayed, the color element "frame" doesn't override this.

  • theme_toolbar img

"theme_toolbar" : "images/toolbar.png"

This is an image that covers the area of the current tab and the toolbar below it.

Make sure this image is over 119px in height because the find bar (which appears when you press Ctrl+F) shares the tool bar image, the width is up to you. Similar to the

theme_frame, this image also tiles along the x-axis so you have the option to create pattern or create a looong width image for the toolbar. Remember that the toolbar contains some buttons and when the bookmarks are visible (CMD+B or Ctrl+B), they too occupy space in the toolbar:

So don't make the design too much crowded, or else the toolbar will not be visually appealing. Usually for the toolbar, a square, tiling image is preferred, which might be a gradient or just plain color.

  • theme_tab_background img

"theme_tab_background" : "images/tab_background.png"

This is an image, this represents all the inactive tabs.

Usually a less saturated image of theme_toolbar is used for this. You may also design something else, but make sure that the design enables the user to distinguish the inactive tabs from the active one! This image also tiles default in x-axis and the height of this can be around 65px , the width is up to you.

  • theme_ntp_background img

"theme_ntp_background" : "images/ntp_background.png"

This is the image that is displayed at the large white space in the browser, in the new tab page, it can contain a background image that contains alpha transparency (the default page that contains various quick access elements-see the help image). Note that the notation ntp represents new tab page, hence all elements which contain ntp in the notation will correspond to some element inside the new tab page.

There are two ways you can create the inner background for the browser-use a large image without repetition/tiling or use a small image that repeats in x-axis and/or y-axis.(see ntp_background_repeat).

There is also option for you to select the alignment of this image, by default the image is center aligned, but you may choose to align it the way you want (see ntp_background_alignment).

  • theme_frame_inactive

"theme_frame_inactive" : "images/frame_inactive.png"

This is an image, representing the area behind the tabs, when the chrome window is out of focus/inactive.

All that is applicable to theme_frame, applies to this. Usually to avoid making the theme heavy, you can go for frame_inactive tint, to show that the window is inactive-it's efficient than creating a whole new image. But it's up to the designer to decide, if it's going to be an image separately for the inactive state or there is going to be a color tint when the window is inactive.

  • theme_frame_incognito

"theme_frame_incognito" : "images/frame_incognito.png"

This is similar to the theme_frame, but this image represents the frame of a window in incognito mode. You may choose to redesign the image specially for the incognito mode or ignore this, so that whatever you made for theme_frame will be tinted (see frame_incognito) and used in incognito mode (it's by default that it gets a dark tint in incognito mode).

  • theme_frame_incognito_inactive

"theme_frame_incognito_inactive" : "images/frame_incognito_inactive.png"

This is also an image, similar to theme_frame_inactive, but this image is for the inactive frame of a window in incognito mode. (see frame_incognito_inactive)

  • theme_tab_background_incognito

"theme_tab_background_incognito" : "images/tab_background_incognito.png"

This is an image, that represents the inactive tabs, in the incognito mode. Alternatively one can use the tinting background_tab, to effect inactive tabs in incognito mode, but there is a slight problem that some may want to avoid – even if you tint the inactive tabs of the incognito window, the inactive tabs are made transparent (by default). Hence they'll show the area behind them. i.e. the frame. If you want to avoid this, you can include this image.

  • theme_tab_background_v

"theme_tab_background_v" : "images/tab_background_v.png"

Until now, the role of this image is a mystery, that someone needs to unlock!

  • theme_frame_overlay

"theme_frame_overlay" : "images/frame_overlay.png"

This is the image that will be displayed at the top left corner of the frame, over the theme_frame image. Also this image doesn't repeat by default. Hence this image may be used in case you don't want the frame area design to repeat. Similar to the theme_frame, anything over 80px height is good, usually with grading alpha transparency at the bottom so that the image blends with the "frame" color.

  • theme_frame_overlay_inactive

"theme_frame_overlay_inactive" : "images/frame_overlay_inactive.png"

This is similar to theme_frame_overlay, but will be displayed when the browser window is inactive. If you do not include this image, theme_frame_overlay image will be darkly tinted and used by default-to denote the inactive frame.

  • theme_button_background img

"theme_button_background" : "images/button_background.png"

This image specifies the background for various buttons (stop, refresh, back, forward, etc.) in the toolbar. This image is optional, if you do not include this image, the color element button_background overrides the button's background color.

Whatever image you give for this, the browser leaves off two pixels at top and left of the image and maps a square 25px image to the buttons as background. And the icon/symbol of the button (stop, refresh, back, forward, etc.) is displayed at the center, check the image below for more details…

img

  • theme_ntp_attribution

img

"theme_ntp_attribution" : "images/ntp_attribution.png"

This is the image that is displayed at the bottom right corner of the new tab page. Chrome automatically puts a heading "Theme created by" and below that displays whatever image you give as theme_ntp_attribution.

A good practice is to create a small png file enough for an author name (and contact if needed) with alpha transparency background. Making large and more color intense image will attract view, but will make the theme a bit heavier (the file size of the theme may increase with bigger png file) but it's your choice anyway.

  • theme_window_control_background img

"theme_window_control_background" : "images/window_control_background.png"

This image specifies the background for the window control buttons (minimize, maximize, close and new tab). This image is also not necessary until you desperately need to change the control button background. If the image is included, the browser leaves off 1px at the top and left of image and maps a 16px height button from it, the width varies according to buttons though.

If this image is not included, the control buttons assume the background color specified in the color element button_background.

Colors

  • Frame img

"frame" : [ 77, 139, 217 ]

This color element specifies the color of the frame area of the browser (the area behind the tabs + the border). It occupies the area that is not covered by the theme_frame image. The format to specify this element in the manifest.json file is : "frame" : [R,G,B]

  • Frame_inactive

"frame_inactive" : [ 152, 188, 233 ]

This color element specifies the color of the frame area of the browser but when the window is inactive/out of focus (the area behind the tabs + the border). It occupies the area that is not covered by the theme_frame image. The format to specify this element in the manifest.json file is :"frame_inactive" : [R,G,B]

  • Frame_incognito

"frame_incognito" : [ 83, 106, 139 ]

This is a color element similar to "frame" ,but under the incognito mode.

  • Frame_incognito_inactive

"frame_incognito_inactive" : [ 126, 139, 156 ]

This is a color element similar to "frame_inactive" ,but under the incognito mode.

  • toolbar img

"toolbar" : [ 210, 225, 246 ]

This is a color element that specifies the background color of the bookmarks bar, that is visible only in the new tab page, when you press the shortcut keys Ctrl+B or CMD+B. And it contains a 1px border whose color is defined by ntp_header. Also this element can contain an opacity value that effects transparency of this bar. Note that opacity value are float values that ranges from 0 to 1, 0 being fully transparent and 1 being fully opaque.

The format to specify this element in the manifest.json file is : "toolbar" : [R,G,B,opacity]

Eg. "toolbar" : [25, 154, 154, 0.5]

Note that this element also specifies color value of the background for floating the status bar (in the bottom of page). It's found that using opacity values for this element makes the status bar transparent, but the text inside it will contain a opaque background of same color-hence area without the text will be transparent. Also specifies the color of the download bar and the color of the separators in the toolbar/bookmarks.

  • tab_text img

"tab_text" : [ 0, 0, 0 ]

This color element specifies the color of the title text of the current tab (tab title name of current tab), the text in the status bar and the close cross on the downloads bar.

  • tab_background_text img

"tab_background_text" : [ 64, 64, 64 ]

This color element specifies the color of the title text of all the inactive tabs/out of focus tabs.

  • bookmark_text img

"bookmark_text" : [ 18, 50, 114 ]

This color element specifies the color of the text of bookmarks in the toolbar and the text for the download bar that appears at the bottom. Note : During a download, the text color indicating the number of MB downloaded is not configurable

  • ntp_background img

"ntp_background" : [ 255, 255, 255 ]

This color element specifies the color of the background of the new tab page (covers all areas that is not mapped by theme_ntp_background). Usually if a alpha transparency is employed in the image element theme_ntp_background, make sure that ntp_background is such that it matches that image element.

  • ntp_text img

"ntp_text" : [ 0, 0, 0 ]

This color element specifies the color of all the text that appears in the new tab page (tips, quick access labels, etc.).

"ntp_link" : [ 6, 55, 116 ]

This color element specifies the color of all the links that may appear in the new tab page. Currently the links under list view and links of tips that appear at the bottom of new tab page takes it's color from this.

  • ntp_link_underline img

"ntp_link_underline" : [ 6, 55, 116, 0.33 ]

This color element specifies the color of the underline of all links in the new tab page (the color of underline of the ntp_link element).

  • ntp_header img

"ntp_header" : [ 75, 140, 220 ]

This color element specifies the color for the frame of quick link buttons, when one hovers the mouse over it. It also specifies the 1px border color of the toolbar element, the ntp_section element and the color of three small buttons in the new tab page-thumbnail view, list view, change page layout.

  • ntp_section img

"ntp_section" : [ 229, 239, 254, 0.4 ]

This color element specifies the color for the border of the quick link buttons (see help image) and also the background color for the recently closed bar that appears above the tips area. Similar to the toolbar element, this can also contain opacity value.

  • ntp_section_text

"ntp_section_text" : [ 0, 0, 0 ]

This color element specifies the color of all the text that appears in the section area (currently only the text "Recently closed" derives it's color from this).

"ntp_section_link" : [ 6, 55, 116 ]

This color element specifies the color of all the links that appear in the section area. Currently all the links in the "Recently closed" bar take their color from this.

  • ntp_section_link_underline

"ntp_section_link_underline" : [ 6, 55, 116, 0.33 ]

This color element specifies the color of underlines of all the links that appear in the section area (underliection_link element).nes the ntp_s

  • control_background

"control_background" : [ 0, 0, 0 ]

This should specify the color of the control buttons of the window-minimize, maximize and close. But it doesnt, so use theme_window_control_background

  • button_background img

"button_background" : [ 0, 0, 0 ]

This color element specifies the color for the background of all the buttons in the toolbar area (back, forward, bookmark, etc.). This element too can contain opacity values like the toolbar, which will affect the opacity of the window control buttons (minimize, maximize, close).

NTP Properties

  • ntp_background_alignment

"Tints

The following are tint elements. The tint element buttons is the most common one, but you may include other elements too. Before moving on to those, one must know how the tints work. The tint elements are used to assign color tints to certain elements of the browser area. The value of the tint is in floating values ranging from 0 to 1 or -1.

Eg, "buttons" : [0.3,0.5,0.5]

The values range from 0 to 1, hence even 0.125 or 0.65 represent a color.

If the value is -1 then the value from the original picture is used, or in other words no change is made to this value.

The tints values are arranged as [ Hue, Saturation, Luminance ]

  • Hue Here the first value represents the hue value,for which 0 means red and 1 means red (confused?? see image below) img

     

  • Saturation Next is the saturation value that lets you set the vibrancy of the tint. Here 0 means completely desaturated (no color, grey) and 1 means fully saturated.

    img

  • Luminance The last value is lightness/brightness. Here 0 means make it black (no light) and 1 means most bright (white) with 0.5 being neutral.

     

    img

  • buttons

img

"buttons" : [ -1, -1, -1 ]

This tint element is used to specify a color tint for icons inside all the buttons in the toolbar (back,forward,refresh,etc.,).

  • frame

img

"frame" : [ -1, -1, -1 ]

This tint element is used to specify a color tint for the frame area. Whatever image you've created for the frame area will be tinted with a color that you specify here.

  • frame_inactive

"frame_inactive" : [ -1, -1, 0.75 ]

This tint element is similar to the tint element frame, but the tint is applied when the window is inactive/out of focus.

  • frame_incognito

"frame_incognito" : [ -1, 0.2, 0.35 ]

This tint element is used to specify a color tint for the frame area in incognito mode. Whatever image you've created for the frame area will be tinted with a color that you specify here.

  • frame_incognito_inactive

"frame_incognito_inactive" : [ -1, 0.3, 0.6 ]

This tint element is used to specify a color tint for the frame area in incognito mode, but when the window is inactive/out of focus.

  • background_tab

img

"background_tab" : [ -1, 0.5, 0.75 ]

This tint element specifies the color tint of the inactive tabs in incognito mode.

ntp_background_alignment" : "center"

This property element is used to control the alignment property of the image element theme_ntp_background. The value for this element is entered as follows…

"ntp_background_alignment" : "VALUE"

In the place of VALUE, you can enter either "top", "bottom", "left" or "right". Further you can use combinations like "left top", "right bottom", etc. The difference is that using only "left", aligns the background image to the left center of the new tab page, while using "left top" aligns the image to the top left corner of the new tab page.

Eg, "ntp_background_alignment" : "left bottom" (Note that the default alignment of the background image is center).

  • ntp_background_repeat

"ntp_background_repeat" : "no-repeat"

This property element is used to control the repetition of the image element theme_ntp_background.It is specified as…

"ntp_background_repeat" : "VALUE"

In the place of VALUE you can enter either "repeat", "no-repeat", "repeat-x" or "repeat-y". Depending upon the image you've created as the background you can choose to repeat the image along x-axis or y-axis or turn repeat off, since repeat is on by default!

  • ntp_logo_alternate

"ntp_logo_alternate" : 0

This is a property element that specifies what header of Google chrome you want for your theme. It is specified as follows…

"ntp_logo_alternate" : VALUE

Note that this element's value should not be entered in double quotes! In the place of VALUE you can enter 0 or 1. Choosing 0 will give you a colorful Google Chrome header logo inside the new tab page, choosing 1 will give you an all white Google Chrome header logo inside the new tab page.

Example/Useful Themes

Empty base theme with no values set, but all the sections are there ready to be filled. Just copy the example line for the element into its correct section and set its value.

Empty Theme

A theme for each element that makes them red (the screenshots in this tut were taken using them), except the ntp_logo_alternate which is 0 or 1 to see if its working again yet.

Element Test Themes

This theme is the default Grey Blue Theme. It uses the images that google use so you can see what they use.

Default Grey Blue Theme

The old classic blue theme.

Classic Blue Theme

Useful Links

Waha's manifest syntax highlighters, add syntax highlighting to notepad++ and gedit.

http://www.chromeplugins.org/google/plugins-development/manifest-syntax-highlighting-9275.html

Images used in Chrome….

http://src.chromium.org/viewvc/chrome/trunk/src/chrome/app/theme/

….where to get the files used in the default theme.

Default theme values….

http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/browser_theme_provider.cc

….contains the the default values used in the default theme.

Forums

http://www.chromeplugins.org/google/chrome-themes/

http://valorsolo.com/index.php?page=forum

http://chromespot.com/forum/

http://chrome-themers.deviantart.com/

Few tips….

https://docs.google.com/document/edit?id=1BhKCj5Cx4-QF4WLkmcguhoPgCKHsPE9hqE8MsfWlsI8&hl=en

The original doc

http://code.google.com/p/chromium/wiki/ThemeCreationGuide



Improve your UI development skills

Scrollbar Styling

Use the scrollbar-width and scrollbar-color properties to style scrollbars.

Read the doc

CSS text-wrap balance

A classic typography technique of hand-authoring line breaks for balanced text blocks, comes to CSS.

Read the doc

High-definition CSS color guide

CSS Color 4 brings wide gamut color tools and capabilities to the web: more colors, manipulation functions, and better gradients.

Read the doc

CSS Typed Object Model

CSS Typed Object Model (Typed OM) brings types, methods, and a flexible object model to working with CSS values.

Read the doc

Get started with Style Queries

Query a parent element's style values using the @container rule.

Read the doc

CSS Nesting

One of our favorite CSS preprocessor features is now built into the language: nesting style rules.

Read the doc

CSS @scope

Learn how to create scoped styles that select elements only within a subtree of your DOM.

Read the doc

CSS color-mix()

Mix colors, in any of the supported color spaces, right from your CSS.

Read the doc

More control over nth-child() selections

Pre-filter a set of child elements before applying An+B logic on it.

Read the doc

Exlusive accordion

Create an exclusive accordion with multiple <details> elements that have the same name.

Read the doc

Introducing inert

The inert property is a global HTML attribute that simplifies how to remove and restore user input events for an element, including focus events and events from assistive technologies.

Read the doc

CSS text-wrap pretty

Opt-in optimized text wrapping, for beauty over speed.

Read the doc

CSS Grid in DevTools

How we designed and implemented CSS Grid tooling support in DevTools.

Read the doc

CSS-in-JS support in DevTools

How we support CSS-in-JS in DevTools and how it is different from regular CSS.

Read the doc

Layout

How to use calc()

Specify sizes in CSS using a mixture of sizing units.

Read the docs

An event for CSS position sticky

Log messages and run JavaScript.

Read the docs

Make collapsed content accessible

Discover hidden=until-found, an attribute value can ensure that content within accordion sections can be found and linked to.

Read the docs

CSS and UI case studies

Why do web UI capabilities matter for your website?

What exactly are Web UI capabilities and how can they enhance your conversion funnel? What are the benefits of adopting these features.

Read the case study

Scroll-driven animations case studies

Discover the benefits of Scroll-driven animations with Policybazaar, redBus, and Tokopedia.

Read the case study

View Transitions case studies

redBus, Policybazaar, and Tokopedia all use the View Transitions API and benefit from better performance and a smooth UI.

Read the case study

Popover API case studies

Tokopedia uses the Popover API to reduce the amount of code in their application.

Read the case study

Animations on the web

The Web Animations API

The Web Animations API provides powerful primitives to describe imperative animations from JavaScript.

Read the doc

Multiple animation effects

The animation-composition property allows control of what should happen when multiple animations affect the same property simultaneously.

Read the doc

Complex animation curves with linear()

linear() is a CSS easing function that interpolates linearly between its points, allowing you to recreate bounce and spring effects.

Read the doc

Scroll-driven animations

Work with Scroll Timelines and View Timelines to create scroll-driven animations in a declarative way.

Read the doc

img

COURSE

Learn Responsive Design

Read a history of responsive design and a look at the fundamentals of responsive layouts. You'll learn about responsive images, typography, accessibility and more.

Start learning arrow_forward

img

COURSE

Learn CSS

You'll learn CSS fundamentals like the box model, cascade and specificity, flexbox, grid, and z-index. And, you'll learn about functions, logical properties, and more to round out your front-end developer skills.

Start learning arrow_forward

Scroll to Top