HNHacker News
TopNewBestAskShowJobs

larzang

706 karma · joined July 4, 2014

submissionscomments
larzang··on Sass Guidelines
I have to really disagree about @extend. Yes, it's easy and potentially disastrous to misuse extend erratically, but used sanely there should never be side effects and your compiled css should be smaller than otherwise.

Regarding side effects, they're easy to avoid if you structure your main file in a logical way. For generic extension, your library of base classes (both actual classes and silent classes) should be @included before your components which extend and build on them, therefore any inherited styles come before (and can therefore be overwritten by) the extending component but never the other way around. When extending a component, the extending objects should always be in the same file and come after (e.g. .gallery followed by .gallery-foo and .gallery-bar which both extend .gallery). If full blown objects/components are related enough to extend, they're related enough to be in the same file.

Avoiding @extend file size bloat mostly comes from sane nesting behavior that you should be following regardless. Adding single selectors to an extended rule is almost always going to be smaller than inlining/mixing that rule, even for simple rules.

Discoverability is always going to take a hit with @extend, yes, but in my opinion dryness and single-point-of-change are far more important than in-file discoverability, assuming your project layout is sane.

larzang··on Sass Guidelines
I have to really disagree about @extend. Yes, it's easy and potentially disastrous to misuse extend erratically, but used sanely there should never be side effects and your compiled css should be smaller than otherwise.

Regarding side effects, they're easy to avoid if you structure your main file in a logical way. For generic extension, your library of base classes (both actual classes and silent classes) should be @included before your components which extend and build on them, therefore any inherited styles come before (and can therefore be overwritten by) the extending component but never the other way around. When extending a component, the extending objects should always be in the same file and come after (e.g. .gallery followed by .gallery-foo and .gallery-bar which both extend .gallery). If full blown objects/components are related enough to extend, they're related enough to be in the same file.

Avoiding @extend file size bloat mostly comes from sane nesting behavior that you should be following regardless. Adding single selectors to an extended rule is almost always going to be smaller than inlining/mixing that rule, even for simple rules.

Discoverability is always going to take a hit with @extend, yes, but in my opinion dryness and single-point-of-change are far more important than in-file discoverability, assuming your project layout is sane.

larzang··on Sass Guidelines
I have to really disagree about @extend. Yes, it's easy and potentially disastrous to misuse extend erratically, but used sanely there should never be side effects and your compiled css should be smaller than otherwise.

Regarding side effects, they're easy to avoid if you structure your main file in a logical way. For generic extension, your library of base classes (both actual classes and silent classes) should be @included before your components which extend and build on them, therefore any inherited styles come before (and can therefore be overwritten by) the extending component but never the other way around. When extending a component, the extending objects should always be in the same file and come after (e.g. .gallery followed by .gallery-foo and .gallery-bar which both extend .gallery). If full blown objects/components are related enough to extend, they're related enough to be in the same file.

Avoiding @extend file size bloat mostly comes from sane nesting behavior that you should be following regardless. Adding single selectors to an extended rule is almost always going to be smaller than inlining/mixing that rule, even for simple rules.

Discoverability is always going to take a hit with @extend, yes, but in my opinion dryness and single-point-of-change are far more important than in-file discoverability, assuming your project layout is sane.

larzang··on Sass Guidelines
I have to really disagree about @extend. Yes, it's easy and potentially disastrous to misuse extend erratically, but used sanely there should never be side effects and your compiled css should be smaller than otherwise.

Regarding side effects, they're easy to avoid if you structure your main file in a logical way. For generic extension, your library of base classes (both actual classes and silent classes) should be @included before your components which extend and build on them, therefore any inherited styles come before (and can therefore be overwritten by) the extending component but never the other way around. When extending a component, the extending objects should always be in the same file and come after (e.g. .gallery followed by .gallery-foo and .gallery-bar which both extend .gallery). If full blown objects/components are related enough to extend, they're related enough to be in the same file.

Avoiding @extend file size bloat mostly comes from sane nesting behavior that you should be following regardless. Adding single selectors to an extended rule is almost always going to be smaller than inlining/mixing that rule, even for simple rules.

Discoverability is always going to take a hit with @extend, yes, but in my opinion dryness and single-point-of-change are far more important than in-file discoverability, assuming your project layout is sane.

larzang··on Skeleton 2.0 CSS Framework
I started using Skeleton nearly 3 years ago and there are still bits of it lingering in my base shared scss files in one form or another.

Thanks for your hard work.

larzang··on Ask HN: The best Linux laptop
A lot of people haven't heard of them, but Clevo is a major laptop OEM that makes both rock-solid business platforms and gaming platforms. Sager, System76, FalconNW, and most other boutique laptop builders use rebadged/modified Clevo systems. Clevo doesn't sell direct to customers, but there are plenty of sites where you can buy customized or barebones systems for very reasonable prices.

This summer I bought a W670SZQ from AVADirect, with an i5 and SSD it was just under $900. For a full size 17" laptop the weight is very reasonable, and it's a great system that Xubuntu and Mint worked fine on with zero tweaking.

larzang··on Why Parse the User Agent?
You just described the new "picture" element. It's an element with one or more "source" child elements which each have a media query and a uri, as well as an img child element to use as a fallback for non-supporting browsers.

Browser support isn't really there yet but it's coming and since it has a built-in fallback you can use it now without requiring JS workarounds.

larzang··on Replacing Dropbox with BitTorrent Sync
Yep, I use both because each is well-suited to different things.

For a small number of critical files and documents I absolutely want a remote copy of I have Dropbox (this is also where Dropbox's versioning comes in handy), while for all my large folders with stuff that's non-critical or already remotely stored I have BTSync, as well as for temporary and ad-hoc sharing.

larzang··on Ask HN: Which laptop brands are worth shortlisting for Windows work/development?
Clevo is a major Taiwanese OEM you may not have heard of but builds excellent business-class laptops. They don't sell direct to consumers, but any small system builder you buy from (FalconNW, System76, etc) is probably selling rebadged/modified Clevo laptops, and you can buy barebones or custom systems from retailers like AVADirect in the US.

They're very reasonably priced in addition to being well-built.

larzang··on Square Raises $150M at a $6B Valuation
> They have not yet delivered a polished product that's enjoyable to use and makes lots of money.

The small business I work for recently switched to Square Register via an iPad and the Square Stand for all POS and it's pretty brilliant. It's a big step up from using a phone plus the regular little reader, and setup and use are quite simple even for our tech-illiterate employees. Judging by the popularity of the related receipt printer and cash drawers on Amazon, we're far from the only ones to make this jump recently.

I don't know how much money they're making per $100 stand, but they've made the barrier to a modern flexible POS system so low that I'd be surprised if their share of the payment processing pie isn't growing quickly.

larzang··on Has LinkedIn lost control of its user email database?
How could you tell the difference from the regular LinkedIn experience?
larzang··on Terminal – Virtual computers that start, resize, and scale in seconds
When dealing with any new and unfamiliar system, the best way to troubleshoot unclear features or generic errors is usually to hit up Google for those who ran into the same thing. Making your product ungooglable is a great way to ensure developers never touch it.
larzang··on CSS is unnecessary given a layout language
Because the ui of a website or program is not just an interface, it's also (and quite often primarily) presentation. Visual presentation is a justifiably complex field with a rich history that has taught us that how you present information is often just as important as the information itself. All those colors, animations, etc are an integral part of expressing authorial intent that goes far beyond simple branding.

Arguing that computer ux should solely be driven by the needs of interface without concern for presentation is like arguing that all print media should look like unillustrated pages from a research paper.

← PreviousPage 6 of 6