atom: first configuration and install

Recommended packages.

You can't miss this packages in your atom ide configuration:

  • Emmet: to improve HTML and CSS work flow. | more info.
  • Sublime Style Column Selection: you can use the feature for vertical selection with alt - click - drag inside atom like in sublime text.
  • atom ternjs: this plugin give to you intellisense for JavaScrip. This need activatio in the properties plugin forn working.
  • file-icons: the icons for the left sidebar, I love this (really cool).
  • atom-preview-html: you can have a little browser simply pressing CTRL + SHIFT + M | package-info.
  • open-in-browser: open html in your browser | package-info.
  • minimap: a preview of the full source code sublime style | package-info.
  • pigments: a package to display colors in project and files | package-info.

Some Keyboard shortcuts

CMD - \ show/hide three
CMD - D select same items inside the document
CTRL - W text wrap html
CMD - L select line
CRTL - M parent parenthesis check
CRTL - CMD - M select code inside parenthesis

JS – DOMContentLoaded

Si utilizza DOMContentLoaded quando si ha necessità di caricare completamente tutta la pagina prima di visualizzarla. Si utilizza al posto dell'istruzione: window.onload

  document.addEventListener("DOMContentLoaded", function(event) {
    console.log("DOM fully loaded and parsed");

Maggiori info nella: reference

bootstrap: change tooltip color

To change tooltip color in bootstrap add to your wrap the class "red-tooltip" (red can be another colors, simply change the color code in your css) and then add this code to the css file:

.red-tooltip + .tooltip > .tooltip-inner {background-color: #f00;}
.red-tooltip + .tooltip > .tooltip-arrow {border-bottom-color:#f00; }

You have to change border-bottom with "right" if you want use right view or "left" in you want use left view or top for top view

css: using the @font-face directive

The secret to web fonts is a CSS command called the @font-face directive.

This command at its most basic names the font and tells the browser where to find the
font file for download.

You place the @font-face directive in your style sheet, just like a regular style.

For example, say you’re using the League Gothic font. You have a True Type file named League_Gothic-webfont.ttf inside a fonts folder on your site.

You’d instruct a browser to download this font by adding the @font-face directive to your style sheet like this:

@font-face {
font-family: "League Gothic";
src: url('../fonts/League_Gothic-webfont.ttf');

The first property, font-family, you’ve seen before (page 127), but here it has a different purpose. When used inside an @font-face directive, font-family assigns a
name to the font.

When used inside an @font-face directive, font-family assigns a
name to the font.

For example, say you want to use the League Gothic font for all paragraphs
on a page. You could then use this style:

p {
font-family: "League Gothic";

WP: link favicon in the theme

If there is already an old favicon.ico file in your current theme’s main folder, delete it using FTP Clients.

With an FTP Client, upload the new favicon.ico file into your current theme’s main folder.

Upload another copy of your favicon.ico file to the main directory of your site (ie. This will display the favicon in your subscribers’ feedreaders.

In order for your favicon to show up in some older browsers, you will need to edit your page header. Remember, the best way to edit your theme's files is via a Child Theme. For the purpose of the following instructions you will need to create a copy of your parent theme's header.php file in your child theme.

Go to your WordPress Administration Panel.

  1. Click on Appearance.
  2. Click on Theme Editor.
  3. Select the file called Header or header.php to edit the file.
  4. Search for the line of code that begins with
    <link rel="shortcut icon" and ends with /favicon.ico" />

    Overwrite it, if it exists, or add the following the same code below the <head> HTML tag.

more [email protected] WPcodex: Creating a Favicon