A tweet-sized debugger for visualizing your CSS layouts. Outlines every DOM element on your page a random (valid) CSS hex color.
One-line version to paste in your DevTools
Use $$
if your browser aliases it:
~ 108 byte version
/* | |
ArtboardsToXCAssets.jsx | |
Exports each Illustrator artboard as a PDF vector template in the selected XCode Images.xcassets folder | |
Copyright (c) 2014 Simon Heys <http://www.simonheys.com/> | |
License: MIT License (MIT) <http://www.opensource.org/licenses/mit-license.php> | |
*/ | |
var folder = Folder.selectDialog('Select Images.xcassets folder'); |
(function(){ | |
var log = console.log; | |
console.log = function(str) { | |
var css = 'background: linear-gradient(to right, red, yellow, lime, aqua, blue, fuchsia, red); color: white; font-weight: bold;'; | |
var args = Array.prototype.slice.call(arguments); | |
args[0] = '%c' + args[0]; | |
args.splice(1,0,css); | |
return log.apply(console, args); | |
} |
createElement.js lets document.createElement use CSS selectors.
This is a pretty useful library for building out DOM elements. The whole thing runs on one regex and a for loop, so it’s plenty fast. The script is 300 bytes when compressed and gzipped. For 524 bytes (advanced), it includes nesting support and can generate entire DOM hierarchies, including text nodes.
document.createElement(); // generates <div />
$bgcolor: hsl(53,56%,87%); | |
.button-primary { | |
background: $bgcolor; | |
color: if(lightness($bgcolor) < 50%, white, black); | |
} |
[self.navigationController.navigationBar.subviews enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) { | |
if ([obj isKindOfClass:NSClassFromString(@"_UINavigationBarBackground")]){ | |
UIView* v = obj; | |
[[v.subviews objectAtIndex:1] removeFromSuperview]; | |
*stop=YES; | |
} | |
}]; |
@版本 2.0.0
譯注:此翻譯版,主要給不能流利的讀英文的人看,相關專有名詞還是保留原文。翻譯不好地方請協助pull request.
此repository包含了一些前端開發的面試問題,來審查一個有潛力的面試者。這並不是建議你對同一個面試者問上所有的問 (那會花費好幾小時)。從列表中挑幾個題目,應該就夠幫助你審查面試者是否擁有你需要的技能。
Rebecca Murphey 的 Baseline For Front-End Developers 也是一篇很棒且值得讀的文章在你開始面試之前。
mymodule { | |
@at-root { | |
.#{&}-header { ... } | |
.#{&}-footer { ... } | |
.#{&}-body { | |
a { ... } | |
span { ... } | |
p { ... } | |
} | |
} |