Skip to content

Commit 57defc1

Browse files
committed
Update to v1.2
1 parent 347f101 commit 57defc1

30 files changed

+596
-689
lines changed

README.md

+116-14
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,131 @@
11
HTML and CSS Template
22
=====================
33

4-
Version 1.1, September 5, 2014
4+
Version 1.2, March 10, 2017
55

6-
This is frontend template for web project. Includes:
6+
This is template for web page. Includes:
77

8-
- HTML valid document with all necessary tags in the head tag and some tips;
9-
- CSS basis and tricks for easy start any project (based on Normalize, Bootstrap and my own works);
8+
- valid HTML document with all necessary tags in the head section;
9+
- CSS basis for easy start;
1010
- humans.txt example file;
1111
- robots.txt example file;
1212
- sitemap.xml example file;
13-
- set of favicons in (really) all resolutions that are necessary;
13+
- set of favicons of basic necessary resolutions;
1414

15-
Recomend to minimize and compile css styles when use.
15+
Used Components:
1616

17+
- [Normalize.css 5.0.0](http://necolas.github.io/normalize.css/);
18+
- [Bootstrap 3.3.7](http://getbootstrap.com/) as basis of all styles;
1719

18-
Browsers support
19-
----------------
20-
IE 8+, Firefox 4+, Safari 5+, Opera, Chrome
20+
Browsers support: Chrome, Firefox, Opera, IE 8+, Safari 6+.
2121

22+
Recomend to minimize and compile css styles to use on production.
2223

23-
Used components
24-
---------------
25-
- [Normalize.css 3.0.1](http://github.com/necolas/normalize.css) as styles base
26-
- [Bootstrap 3.2.0](http://getbootstrap.com/) as source of many good decisions and design
2724

25+
HEAD section specias
26+
--------------------
2827

29-
2014, Ivan Dymkov
28+
### Mobile optimized page
29+
30+
Tag `meta` with name="viewport" and css rule '@-ms-viewport'
31+
in 'assets/basis.css' tells browser that the page is mobile optimized.
32+
There are two old tags for the same task, I removed from html document.
33+
They used by Palm devices and Windows Mobile devices:
34+
35+
<meta name="HandheldFriendly" content="True">
36+
<meta name="MobileOptimized" content="320">
37+
38+
### Old IE compatibility
39+
40+
With tag `<meta http-equiv="x-ua-compatible" content="IE=edge,chrome=1">`
41+
IE uses the highest supported
42+
[document mode](https://msdn.microsoft.com/en-us/library/jj676915.aspx)
43+
(actual for IE8-10).
44+
45+
[Html5shiv](https://github.com/aFarkas/html5shiv) adds HTML5 elements support
46+
to IE 6-8
47+
48+
Tag `<meta http-equiv="msthemecompatible" content="no">` prevent to adjust
49+
the OS theme to your website in IE. But this only for IE6 and Windows XP. Skip.
50+
51+
### Basic Page Info
52+
53+
Tags `title` and `meta` with name="description" gives basic information about
54+
the page to search engines. They are required. Tag `meta` with name="keywords"
55+
is optional and possibly ignored by search engines crawlers.
56+
57+
### Twitter card
58+
59+
With [Twitter Cards](https://dev.twitter.com/cards), you can attach rich photos,
60+
videos and media experiences to Tweets, helping to drive traffic to your
61+
website. Simply add a few lines of markup to your webpage, and users who Tweet
62+
links to your content will have a “Card” added to the Tweet that’s visible
63+
to their followers.
64+
65+
Tag `<meta name="twitter:card" content="summary">` enable Twitter card.
66+
Title, description and image Twitter
67+
[will get](https://dev.twitter.com/cards/getting-started#twitter-cards-and-open-graph)
68+
from Open Graph tags.
69+
70+
Use other Twitter Card meta-tags only for
71+
[special cases](https://dev.twitter.com/cards/types).
72+
73+
### Open Graph protocol
74+
75+
[The Open Graph protocol](http://ogp.me/) enables any web page to become
76+
a rich object in a social graph. For instance, this is used on Facebook
77+
to allow any web page to have the same functionality as any other object
78+
[on Facebook](https://developers.facebook.com/docs/sharing/webmasters).
79+
80+
### Favicon
81+
82+
Build a correct favicon.ico file with ImageMagick:
83+
84+
convert fav16.png fav32.png fav48.png fav64.png favicon.ico
85+
86+
Or with [online service](http://icoconvert.com/).
87+
88+
### Apple touch icons
89+
90+
In tag `link` with rel="apple-touch-icon" you can set the Apple touch icon
91+
[for Web Clip](https://developer.apple.com/library/content/documentation/AppleApplications/Reference/SafariWebContent/ConfiguringWebApplications/ConfiguringWebApplications.html).
92+
Use this [guidelines](https://developer.apple.com/ios/human-interface-guidelines/graphics/app-icon/#app-icon-sizes).
93+
94+
### Microsoft application
95+
96+
With meta tags you can customize data of pinned site
97+
[on Windows desktop](https://msdn.microsoft.com/en-us/library/dn255024.aspx)
98+
and [for IE](https://msdn.microsoft.com/en-us/library/hh772707.aspx). Example:
99+
100+
<meta name="application-name" content="HTML and CSS Template">
101+
<meta name="msapplication-tooltip" content="HTML and CSS Template by Dymio">
102+
<meta name="msapplication-starturl" content="http://github.com/dymio/html-css-template">
103+
<meta name="msapplication-TileColor" content=" #009900" />
104+
<meta name="msapplication-TileImage" content="ico/squareicon.png">
105+
<meta name="msapplication-square70x70logo" content="ico/smalltile.png" />
106+
<meta name="msapplication-square150x150logo" content="ico/mediumtile.png" />
107+
<meta name="msapplication-wide310x150logo" content="ico/widetile.png" />
108+
<meta name="msapplication-square310x310logo" content="ico/largetile.png" />
109+
110+
In the html document I use only top tags for Metro UI: TileColor and TileImage.
111+
112+
113+
License
114+
-------
115+
116+
[The MIT License (MIT)](https://opensource.org/licenses/MIT),
117+
Copyright 2014 Ivan Dymkov.
118+
119+
120+
Contributing
121+
------------
122+
123+
1. Fork it
124+
2. Create your feature branch (`git checkout -b my-new-feature`)
125+
3. Commit your changes (`git commit -am 'Add some feature'`)
126+
4. Push to the branch (`git push origin my-new-feature`)
127+
5. Create new Pull Request
128+
129+
Feel free to use code of the project as you want,
130+
[create issues](https://github.com/dymio/html-css-template/issues)
131+
or make pull requests.

UPDATE.md

+19-45
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,31 @@
11
Update process
22
--------------
33

4-
Get the latest version of [Normalize.css](http://github.com/necolas/normalize.css) and put it to assets/normalize.css file.
4+
1. Get the latest version of
5+
[Normalize.css](http://github.com/necolas/normalize.css)
6+
and put it to assets/normalize.css file.
57

6-
Get the latest version of [Bootstrap](http://getbootstrap.com/). Task if take all styles of base elements without styles for classes (instead table and helpers) and without not really good decisions (IMHO).
8+
2. Get the latest version of [Bootstrap](http://getbootstrap.com/) css file.
9+
Get all styles of elements without classes (instead of table and clearfix).
10+
Skip not good decisions (like 'box-sizing: border-box' for all, IMHO).
711

8-
Copy print section (@media print) from bootstrap.css to assets/print.css.
12+
3. Media print section (@media print) put to print.css file.
913

10-
Ignore glyphicon styles.
14+
4. Ignore box-sizing rules for `*, *:before, *:after` elements.
1115

12-
Ignore all styles for classes (instead table, but later about it).
16+
5. Update all commont styles in basis.css file: for html, body, a, figure, img
17+
tags, forms styles, '@-ms-viewport' rule etc.
1318

14-
Ignore box-sizing rules for all elements.
19+
6. Update styles of content elements in content.css. Don't forget to add
20+
'.content' selector before added css rule.
21+
Content elements are elements which user can add by wysiwyg editor.
22+
Paragraphs, headers, hr, lists, tables etc.
1523

16-
Copy html and body styles to assets/basis.css with replacing text color form #333 to #000.
24+
6.1. Table styles without classes is boring in Bootstrap. Compile styles
25+
of table element and '.table' class together.
1726

18-
Also copy to assets/basis.css rules for a, img and figure elements (do not remove anchor underline variants comment cheat).
27+
6.2. Do not remove `.content img { max-width: 100%; }` from content.css.
1928

20-
All styles of inputs, selects, fieldsets and other forms components copy to assets/forms_basis.css (do not forget to remove rules for elements with classes).
29+
7. Update [readme file](README.md): last update date and component versions.
2130

22-
Styles of other elements copy to assets/content.css but put before every rule class '.content'. Example: `.content hr`.
23-
24-
Add `.content img { max-width: 100%; }` to assets/content.css file.
25-
26-
Save rules for classes '.h1', '.h2', '.h3', '.h4', '.h5', '.h6', '.small', '.mark' and do not insert '.content' class before.
27-
28-
Also save elements with classes 'pull-right' and 'pull-left' - this classes we will save into helpers.
29-
30-
Table styles without classes is boring in bootstrap. Need to compile styles of 'table' and '.table' together and put it to assets/content.css file (with adding '.content' before).
31-
32-
Put to assets/helper.css file usefull universal classes rules:
33-
* .text-left
34-
* .text-right
35-
* .text-center
36-
* .text-justify
37-
* .text-nowrap
38-
* .text-lowercase
39-
* .text-uppercase
40-
* .text-capitalize
41-
* .fade (with modifications)
42-
* .collapse (with modifications)
43-
* .clearfix
44-
* .center-block
45-
* .pull-right
46-
* .pull-left
47-
* .affix
48-
* .hide
49-
* .show
50-
* .invisible
51-
* .text-hide
52-
* .hidden
53-
* .visible-print (with modifications)
54-
* .hidden-print
55-
* maybe something new?
56-
57-
Put to assets/helper.css file `@-ms-viewport` rule.
31+
8. Update last update in [humans txt](humans.txt) file;

assets/basis.css

+84-15
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
/*!
2-
* Screen base styles
3-
* taken from Bootstrap v3.2.0 | MIT License | getbootstrap.com
2+
* Screen base styles (include form base styles)
3+
* based on Bootstrap v3.3.7 | MIT License | getbootstrap.com
44
*/
55

66
html {
77
font-size: 10px;
88
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
99
}
10-
1110
body {
1211
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
1312
font-size: 14px;
@@ -17,34 +16,104 @@ body {
1716
}
1817

1918
a {
20-
color: #428bca;
19+
color: #337ab7;
2120
text-decoration: none;
2221
}
2322
a:hover,
2423
a:focus {
25-
color: #2a6496;
24+
color: #23527c;
2625
text-decoration: underline;
2726
}
2827
a:focus {
29-
outline: thin dotted;
3028
outline: 5px auto -webkit-focus-ring-color;
3129
outline-offset: -2px;
3230
}
33-
/* anchor underline variants */
34-
/* - single line only variant -
35-
display: inline-block;
36-
border-bottom: 1px solid;
37-
line-height: 90%;
38-
*/
39-
/* - good variant for single color inline link (can be multiline) -
40-
background: url('one_px_428bca.png') repeat-x left 1.26em;
41-
*/
31+
/* Think underline variant for inline-block link:
32+
display: inline-block;
33+
border-bottom: 1px solid;
34+
line-height: 90%; */
35+
/* Thin underline variant for inline with 1 square px image:
36+
background: url('one_px_428bca.png') repeat-x left 1.26em; */
4237

4338
figure {
4439
margin: 0;
4540
}
4641
img {
4742
vertical-align: middle;
4843
}
44+
[role="button"] {
45+
cursor: pointer;
46+
}
4947

5048
@-ms-viewport { width: device-width; }
49+
50+
input, button, select, textarea {
51+
font-family: inherit;
52+
font-size: inherit;
53+
line-height: inherit;
54+
}
55+
fieldset {
56+
min-width: 0;
57+
padding: 0;
58+
margin: 0;
59+
border: 0;
60+
}
61+
legend {
62+
display: block;
63+
width: 100%;
64+
padding: 0;
65+
margin-bottom: 20px;
66+
font-size: 21px;
67+
line-height: inherit;
68+
color: #333;
69+
border: 0;
70+
border-bottom: 1px solid #e5e5e5;
71+
}
72+
label {
73+
display: inline-block;
74+
max-width: 100%;
75+
margin-bottom: 5px;
76+
font-weight: bold;
77+
}
78+
input[type="search"] {
79+
-webkit-box-sizing: border-box;
80+
-moz-box-sizing: border-box;
81+
box-sizing: border-box;
82+
-webkit-appearance: none;
83+
}
84+
input[type="radio"],
85+
input[type="checkbox"] {
86+
margin: 4px 0 0;
87+
margin-top: 1px \9;
88+
line-height: normal;
89+
}
90+
input[type="file"] {
91+
display: block;
92+
}
93+
input[type="range"] {
94+
display: block;
95+
width: 100%;
96+
}
97+
select[multiple],
98+
select[size] {
99+
height: auto;
100+
}
101+
input[type="file"]:focus,
102+
input[type="radio"]:focus,
103+
input[type="checkbox"]:focus {
104+
outline: 5px auto -webkit-focus-ring-color;
105+
outline-offset: -2px;
106+
}
107+
output {
108+
display: block;
109+
padding-top: 7px;
110+
font-size: 14px;
111+
line-height: 1.42857143;
112+
color: #555;
113+
}
114+
input[type="radio"][disabled],
115+
input[type="checkbox"][disabled],
116+
fieldset[disabled] input[type="radio"],
117+
fieldset[disabled] input[type="checkbox"] {
118+
cursor: not-allowed;
119+
}

0 commit comments

Comments
 (0)