Skip to content

Instantly share code, notes, and snippets.

View varya's full-sized avatar
🏠
Working from home

Varya Stepanova varya

🏠
Working from home
View GitHub Profile
varyas-mbp:gonzales-try varya$ git diff _styleguide_variables.scss
diff --git a/_styleguide_variables.scss b/_styleguide_variables.scss
index 9645818..54a9e72 100644
--- a/_styleguide_variables.scss
+++ b/_styleguide_variables.scss
@@ -1,6 +1,11 @@
-$color-donatello: #841d85;
-$color-leonardo: #0000ff;
-$color-michelangelo: #FFA500;
-$color-raphael: #ff0000;
@varya
varya / gist:aada74acb9338ce67cf2
Last active August 29, 2015 14:06
Clickable web component
var myButton = Object.create(HTMLElement.prototype);
myButton.createdCallback = function () {
this.addEventListener('click', function(){
// do what you want
})
};
document.registerElement('my-button', { prototype: myButton });
code

``` code ```

@varya
varya / gist:faa8b3f6b3b8fe4c6088
Last active August 29, 2015 14:03
Перевод статьи Макса
Разработка интерфейсов уже не про отдельные фреймворки. Все инструменты доступны, и наша задача сводится только к выбору. А чтобы
сделать правильный выбор, нужно начать с общего подхода, с <strong>методологии</strong>. Но большинство методологий разработаны
большими компаниями. Так ли они применимы в маленьких или нужно переизобретать их, чтобы применять в нашей ситуации?
Скорее всего вы уже знаете об одной из таких методологий, разработанной <a href="http://yandex.ru">Яндексом</a>б это
<a href="http://bem.info">БЭМ</a>. БЭм утверждает, что трех сущностей — <strong>б</strong>локов, <strong>э</strong>лементов и
<strong>м</strong>одификаторов — хватает для того, чтобы написать HTML и CSS, задать коду структуру, использовать компонентный
подход и масштабировать проект до самого высокого уровня.
Я сам какое-то время назад работал в Яндексе и видел, как эта методология работает на больших проектах. В Яндексе БЭМ используют
$ ./node_modules/enb/bin/enb make
16:24:02.691 - build started
16:24:03.115 - [rebuild] [desktop.bundles/index/index.bemjson.js] file-provider
16:24:03.143 - [rebuild] [desktop.bundles/index/index.levels] levels
16:24:03.148 - [rebuild] [desktop.bundles/index/index.bemdecl.js] bemdecl-from-bemjson
16:24:03.179 - [rebuild] [desktop.bundles/index/index.deps.js] deps-old
16:24:03.180 - [rebuild] [desktop.bundles/index/index.files] files
16:24:03.180 - [rebuild] [desktop.bundles/index/index.dirs] files
16:24:03.197 - [desktop.bundles/index] Calm down, OmetaJS is running...
16:24:03.200 - [rebuild] [desktop.bundles/index/index.js] js
./libsass/ast.hpp:488:20: note: hidden overloaded virtual function 'Sass::Expression::type' declared here: different number of parameters (0 vs 1)
virtual string type() { return ""; /* TODO: raise an error? */ }
^
../libsass/ast.hpp:550:24: warning: 'Sass::Unary_Expression::type' hides overloaded virtual function [-Woverloaded-virtual]
ADD_PROPERTY(Type, type);
^
../libsass/ast_def_macros.hpp:14:8: note: expanded from macro 'ADD_PROPERTY'
type name() const { return name##_; }\
^
../libsass/ast.hpp:488:20: note: hidden overloaded virtual function 'Sass::Expression::type' declared here: different return type ('string' (aka 'basic_string<char>') vs
@varya
varya / gist:9353492
Last active August 29, 2015 13:57
Bikes for sale in Amsterdam

2 bikes for sale in Amsterdam

There are 2 almost new bikes for sale. The bikes were bought in September and we used them till November (and not in winter). Now we are moving and cannot take them with us.

###Damenfiets Popal

Wielmaat: 26 inch
Framemaat: 53cm
The model is like here http://www.popal.nl/fiets/medley_1/damesfietsen but different color

› git diff
diff --git a/.bem/levels/bundles.js b/.bem/levels/bundles.js
index a9b7186..7ab396d 100644
--- a/.bem/levels/bundles.js
+++ b/.bem/levels/bundles.js
@@ -44,7 +44,7 @@ exports.getConfig = function() {
]
.map(function(path) { return PATH.resolve(environ.LIB_ROOT, path); })
.concat([
- 'app.common.blocks', 'app.desktop.blocks', 'app.touch.blocks'
@varya
varya / dabblet.css
Created February 12, 2014 10:58
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
.container
{
width: 200px;
border: red 1px solid;
}
<!---
These are the requirements for this page:
* divide the page into 4 columns with an unknown number of rows;
* columns are equal in size with 10px spacing between them;
* in every column 1 photo is displayed with the title below;
* photo’s can be either portrait (150px X 200px) or landscape (200px X 150px), but you don’t know that upfront. A row can thus have only landscape, only portrait, or a mix of landscape and portrait photo’s;
* the spacing between rows is always 10px. Because of the previous rule, rows can thus have unequal height;
* photo’s & title are aligned in the center of the column, the title is 5px below the photo;
* titles are vertically aligned to each other;