これは超訳です。
CSSLintは「なんでこんなルールなんだ…」とイラっとすることが多いですけど、それぞれにそれなりに理由があります。まぁ勿論無視するべきなルールとかもあります。例えば見出し要素の再定義禁止とかはHTML5に対するCSSなら無理な話です。そんなわけでどんな理由なのかを簡単に訳しました。無視するかどうかは自分で決めましょう!
この訳はCSSLintと同じライセンスで提供されます。
function getStyle(el, styleProp) { | |
var value, defaultView = el.ownerDocument.defaultView; | |
// W3C standard way: | |
if (defaultView && defaultView.getComputedStyle) { | |
// sanitize property name to css notation (hypen separated words eg. font-Size) | |
styleProp = styleProp.replace(/([A-Z])/g, "-$1").toLowerCase(); | |
return defaultView.getComputedStyle(el, null).getPropertyValue(styleProp); | |
} else if (el.currentStyle) { // IE | |
// sanitize property name to camelCase | |
styleProp = styleProp.replace(/\-(\w)/g, function(str, letter) { |
(function($){ | |
$.widget("ui.mywidget", { | |
options: { | |
autoOpen: true | |
}, | |
_create: function(){ | |
// by default, consider this thing closed. |
// ---------------------------------------------------------- | |
// A short snippet for detecting versions of IE in JavaScript | |
// without resorting to user-agent sniffing | |
// ---------------------------------------------------------- | |
// If you're not in IE (or IE version is less than 5) then: | |
// ie === undefined | |
// If you're in IE (>=5) then you can determine which version: | |
// ie === 7; // IE7 | |
// Thus, to detect IE: | |
// if (ie) {} |
meter{ | |
display: block; | |
border: 1px outset; | |
height: 20px; | |
width: 100px; | |
overflow: hidden; | |
} | |
meter div | |
{ | |
display: block; |
#include "YourProjectName.h" | |
AudioEffect* createEffectInstance(audioMasterCallback audioMaster) { | |
return new YourProjectName(audioMaster); | |
} | |
YourProjectName::YourProjectName(audioMasterCallback audioMaster) : AudioEffectX(audioMaster, 0, NUM_PARAMS) { | |
} | |
YourProjectName::~YourProjectName() { |
function isStrictFunction(fn) { | |
if (typeof fn != 'function') throw "Not a function"; | |
try { | |
fn.caller, fn.arguments; | |
return false; | |
} catch (e) { | |
return e instanceof TypeError; | |
} | |
} |
/* | |
* Property prefix hacks | |
*/ | |
/* IE6 only - any combination of these characters */ | |
_ - £ ¬ ¦ | |
/* IE6/7 only - any combination of these characters */ |
sin関数の魅力に迫る! | |
これは超ハイテンションでsin関数の魅力に迫るという文章です | |
sin関数は入力された角度(ラジアン)を元に、-1から1までのあいだの値を返却します | |
sin関数は周期的な特徴があって入力する値を増やしていくと... | |
----------------- | |
sin(0) = 0 | |
sin(1) = 0.1 | |
sin(2) = 0.14 | |
... |
/*! | |
* CSS Reset 2011-12-25 | |
* https://gist.github.com/gists/1360380 | |
* | |
* Author: Takeru Suzuki, http://terkel.jp/ | |
* License: Public domain | |
* | |
* Inspired by Normalize.css: http://necolas.github.com/normalize.css/ | |
*/ |