Code Monkey home page Code Monkey logo

holo-web's Introduction

Holo Web

Holo Web is a few stylesheets that attempt to imitate the Android “Holo” themes.

Holo-ify your site

If you want to Holo-ify HTML elements on your page, you just need to include two files:

  • “holo-base-elements.css”, which defines the sizes of the elements
  • One of the following, which will color the page like the corresponding Holo theme:
    • “holo-hc-dark-elements.css” (Honeycomb Holo Dark)
    • “holo-hc-light-elements.css” (Honeycomb Holo Light)
    • “holo-ics-dark-elements.css” (Ice Cream Sandwich Holo Dark)
    • “holo-ics-light-elements.css” (Ice Cream Sandwich Holo Light)
    • “holo-kk-dark-elements.css” (KitKat Holo Dark)
    • “holo-kk-light-elements.css” (KitKat Holo Light)

Add Holo widgets

You can use widgets like action bars (currently available) and tabs (coming soon) by adding other stylesheets and specifying classes:

  • “holo-base-widgets.css”, which defines the sizes of the elements
  • One of the following, which will color the widgets like the corresponding Holo theme:
    • “holo-hc-dark-widgets.css” (Honeycomb Holo Dark)
    • “holo-hc-light-widgets.css” (Honeycomb Holo Light)
    • “holo-ics-dark-widgets.css” (Ice Cream Sandwich Holo Dark)
    • “holo-ics-light-widgets.css” (Ice Cream Sandwich Holo Light)
    • “holo-kk-dark-widgets.css” (KitKat Holo Dark)
    • “holo-kk-light-widgets.css” (KitKat Holo Light)
  • To add an action bar, add a <header> element with the class holo-actionBar: <header class="holo-actionBar"> (use a <footer> element for a bottom action bar)

Note: adding the base stylesheet will automatically add padding for action bars.

Make it work on older mobile browsers

One great use of Holo Web is to make mobile web sites look like native Android apps. Holo Web includes a script to make sure all widgets respond to touch properly in mobile WebKit (Mobile Safari, Android Browser, Chrome for Android).

  • Make sure you include the “holo-touch.js” file in your project.
  • Add a script tag to your page: <script type="text/javascript" src="holo-touch.js"></script>.

The Roboto Font

holo-base-elements.css imports basic Roboto by default. If you need more weights or character sets, you can load them through Google Web Fonts.

Known issues

  • Certain form elements (checkboxes, radio buttons) are only properly themed in WebKit-based browsers (e.g. Safari, Chrome) and partially themed in Presto (older Opera) and the latest version of Trident (IE10+).
  • Certain form elements, such as range sliders, are unsupported in some older browsers.

The above issues are the result of browser limitations or lack of documented solutions.

Contributing to Holo Web

Contributions to this project are welcome. Please follow standard commit guidelines.

holo-web's People

Contributors

mwleeds avatar transiscodev avatar zmyaro avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

holo-web's Issues

Your README seems to be broken

Hey, I can't trust in a CSS that has an ugly README. You should add some pictures in addition to the website.
It's the only thing.
Thanks

Implement `holo-dialog`

This should be the basic dialog container. Content can be added with other elements and widgets.

Carriage returns in source files (^M/CR)

I just noticed from a git diff (not limited to this file):

+++ b/platforms/android/assets/www/css/holo-base-widgets.css
@@ -0,0 +1,99 @@
+body {^M
+       padding-top:44px;^M
+       padding-bottom:44px;^M
+}^M
+^M
+.actionBar, .holo-actionBar { /* the top action bar should be a <header> element */^M
+       display: block;^M
+       -webkit-box-sizing: border-box;^M
+          -moz-box-sizing: border-box;^M
+               box-sizing: border-box;^M
+       position: fixed;^M
+       top: 0px;^M
...

This can easily be fixed with a simple search+replace in nano or sed

Implement `holo-list`

This should be a <ul> or <ol> in which all the <li>s get styled like menu items. Nothing is pressable by default, but <button>s inside the <li>s get styled like the pressable parts of menu items (with the backgrounds and borders stripped, like a .holo-actionBar > button.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.