Skip to content

Instantly share code, notes, and snippets.

View YauhenKavalchuk's full-sized avatar
🎯
Focusing

Yauhen Kavalchuk YauhenKavalchuk

🎯
Focusing
View GitHub Profile
// Файл "tsconfig.json":
// - устанавливает корневой каталог проекта TypeScript;
// - выполняет настройку параметров компиляции;
// - устанавливает файлы проекта.
// Присутствие файла "tsconfig.json" в папке указывает TypeScript, что это корневая папка проекта.
// Внутри "tsconfig.json" указываются настройки компилятора TypeScript и корневые файлы проекта.
// Программа компилятора "tsc" ищет файл "tsconfig.json" сначала в папке, где она расположена, затем поднимается выше и ищет в родительских папках согласно их вложенности друг в друга.
// Команда "tsc --project C:\path\to\my\project\folder" берет файл "tsconfig.json" из папки, расположенной по данному пути.
// Файл "tsconfig.json" может быть полностью пустым, тогда компилятор скомпилирует все файлы с настройками заданными по умолчанию.
// Опции компилятора, перечисленные в командной строке перезаписывают собой опции, заданные в файле "tsconfig.json".
@YauhenKavalchuk
YauhenKavalchuk / Form reset
Created March 30, 2016 14:00
Full forms reset
/* ----------------------------------------------------------------------------------------------------
Super Form Reset
A couple of things to watch out for:
- IE8: If a text input doesn't have padding on all sides or none the text won't be centered.
- The default border sizes on text inputs in all UAs seem to be slightly different. You're better off using custom borders.
- You NEED to set the font-size and family on all form elements
- Search inputs need to have their appearance reset and the box-sizing set to content-box to match other UAs
<div class="wrapp">
<div class="item"></div>
</div>
SASS
.wrapp {
text-align: justify;
&:after {
content: "";
HTML:
<div class="divider">
<div class="divider__text">
Text
</div>
</div>
SCSS:
.divider {
CSS:
::-webkit-input-placeholder {
}
::-moz-placeholder {
}
:-moz-placeholder {
}
:-ms-input-placeholder {
}
HTML:
<div class="square">
<span class="square_dummy"></span>
<span class="square_element">Content</span>
</div>
CSS:
.square {
display: inline-block;
position: relative;
CSS:
#loader {
background: none repeat scroll 0 0 #ffffff;
bottom: 0;
height: 100%;
left: 0;
position: fixed;
right: 0;
top: 0;
width: 100%;
$(".navigation li").on("click","a", function (event) {
event.preventDefault();
var id = $(this).attr('href'),
top = $(id).offset().top;
$('body,html').animate({scrollTop: top}, 1500);
});
// Cache selectors
var lastId,
topMenu = $("#top-menu"),
topMenuHeight = topMenu.outerHeight()+15,
// All list items
menuItems = topMenu.find("a"),
// Anchors corresponding to menu items
scrollItems = menuItems.map(function(){
var item = $($(this).attr("href"));
if (item.length) { return item; }