!important
используется в functional css (tachyons, basscss).text-center {
text-align: center !important;
}
.text-center
const list = [1, 2, 3, 4, 5];
const randomIndex = max => Math.floor(Math.random() * max);
function dropThemRandomly(nums) {
return function() {
const dropped = nums[randomIndex(nums.length)];
nums = nums.filter(num => num !== dropped);
console.log(dropped);
return dropped;
};
}
const dropper = dropThemRandomly(list);
// вызываю dropper() пять раз
[1, 2, 3, 4, 5].forEach( () => dropper() );
const grid = document.querySelector('.js-filterable-gallery');
const gallery = new Isotope( grid, {
itemSelector: '.js-filterable-item',
layoutMode: 'fitRows',
});
gallery.imagesLoaded().progress( function() {
gallery.isotope('layout');
});
class NewsList extends React.Component {
render() {
const { data } = this.props;
const news = data.map((item, i) =>
<News item={item} key={item.title + i} />
);
return (
<div className="news-list">
{news}
</div>
);
}
}
function News({ item }) {
return (
<div className="news">
<h2 className="news__title">{item.title}</h2>
<p className="news__text">{item.text}</p>
</div>
);
}
font-size
для .carousel-cell
height
и width
для .child