/**
 * Copyright 2014 The Chromium Authors. All rights reserved.
 * Use of this source code is governed by a BSD-style license that can be
 * found in the LICENSE file.
 */

/**
 * Preloads images. Without preloading, background image starts loading in
 * the moment when CSS property is applied. Image loading has visible delay and
 * looks like defect.
 */

@media all and (-webkit-max-device-pixel-ratio: 1.5) {
  body::after {
    content:
        url(chrome://resources/images/apps/button.png)
        url(chrome://resources/images/apps/button_hover.png)
        url(chrome://resources/images/apps/button_pressed.png)
        url(chrome://resources/images/apps/button_focused.png)
        url(chrome://resources/images/apps/button_focused_hover.png)
        url(chrome://resources/images/apps/button_focused_pressed.png)
        url(chrome://resources/images/apps/button_inactive.png)
        url(chrome://resources/images/apps/blue_button.png)
        url(chrome://resources/images/apps/blue_button_hover.png)
        url(chrome://resources/images/apps/blue_button_pressed.png)
        url(chrome://resources/images/apps/blue_button_focused.png)
        url(chrome://resources/images/apps/blue_button_focused_hover.png)
        url(chrome://resources/images/apps/blue_button_focused_pressed.png)
        url(chrome://resources/images/apps/blue_button_inactive.png);
    display: none;
  }
}

@media all and (-webkit-min-device-pixel-ratio: 1.5) {
  body::after {
    content:
        url(chrome://resources/images/2x/apps/button.png)
        url(chrome://resources/images/2x/apps/button_hover.png)
        url(chrome://resources/images/2x/apps/button_pressed.png)
        url(chrome://resources/images/2x/apps/button_focused.png)
        url(chrome://resources/images/2x/apps/button_focused_hover.png)
        url(chrome://resources/images/2x/apps/button_focused_pressed.png)
        url(chrome://resources/images/2x/apps/button_inactive.png)
        url(chrome://resources/images/2x/apps/blue_button.png)
        url(chrome://resources/images/2x/apps/blue_button_hover.png)
        url(chrome://resources/images/2x/apps/blue_button_pressed.png)
        url(chrome://resources/images/2x/apps/blue_button_focused.png)
        url(chrome://resources/images/2x/apps/blue_button_focused_hover.png)
        url(chrome://resources/images/2x/apps/blue_button_focused_pressed.png)
        url(chrome://resources/images/2x/apps/blue_button_inactive.png);
    display: none;
  }
}