The case against SASS nested CSS selectors

For a long time I have been a proponent for LESS. Simple, basic, and does what matters most – CSS compilation from multiple sources. While SASS comes with a variety of merits, the supposed “benefit” that people seem to often enjoy is the ability to nest CSS selectors. Those in the DRY (Don’t Repeat Yourself) mindset absolutely love this feature. Personally, I hate it.

I hate it for the simple reason that I don’t believe that this mess:

.show-some-thing .show-another-thing {
   color: #FFF;
   margin: 10px;

   .some-ugly-button {
      background-color: blue;
      border: 1px solid red; 

      .selected {
         background-color: green;
      }
   }
}

offers enough of a benefit from the supposed “conciseness” to offset the eyesore that it causes.

Sure, this might not be as “concise”, but it sure is easier to read and debug:

.show-some-thing .show-another-thing {
   color: #FFF;
   margin: 10px;
}

.show-some-thing .show-another-thing .some-ugly-button {
   background-color: blue;
   border: 1px solid red; 
}

.show-some-thing .show-another-thing .some-ugly-button .selected {
   background-color: green;
}

And that’s just a basic example. The more nesting, the harder it is to read SASS nested code. My advice – don’t do nest your CSS.

Removing the large screen site option from Bootstrap 3

Last year I endorsed the idea of a full-width blog. No sidebars, no distractions, content in plain focus. While the design is very clean, one flaw with the default settings of the Bootstrap 3 grid is the large screen mode that is enabled for devices with widths larger than 1200px.

It took me a bit of digging around how to properly disable the large screen mode, leaving only xs (extra small), sm (small) and md (medium) @media-query breakpoints. The solution is simple:

In app.less (do not modify Bootstrap LESS files for easier upgrades), first change the medium screen width breakpoint if you’re not satisfied with the default. This will become your maximum container width.

@screen-md: 960px;

Then, override the default media query with the medium screen as the maximum width:

@media (min-width: @screen-md) {
   .container {
      width:@screen-md;
   }
}

Whistler: is it a place, or a state of mind?

Among dozens of ski resorts I’ve visited, Whistler is not only the largest, snowiest resort with the best alpine terrain anywhere in the world, but it is also a truly magical place. Whistler is a state of mind, as much as it is a place. The Whistler lifestyle, most commonly referred to as #whislife on various social media outlets has been glorified for many years. It’s everything together, the landscape, the snow, the amenities, the village, and the people that come here that makes Whistler a true mountain lifestyle that so many skibums flock to from all over the world. It’s also a magnificent place to capture on camera. Enjoy.

 

Whistler Wonder: Day 0 (Seattle, and a long drive to Whistler)

After a day at work and a long flight on Friday, I couldn’t quite tear my eyes open at six in the morning like I wanted to. But I did manage to get out of bed by 8 and go grab some continental breakfast. Cereal, hot waffle, coffee, all the usual. Nothing special, but it’s a $30 Priceline hotel, so I can’t complain. Outside the hotel though, is a sight not often seen in New Hampshire. The gopher friends have been doing some hard work over night…

Gopher Holes in Kent

 Without much delay, I took a quick shower and headed out. The plan was to go to REI to grab some ski wax and a new (warmer) hat, then go to the Pike Place Market and all the surrounding awesome stores that I usually visit, and then finally go to Walmart to stock up on food for the week.

When I parked my car in Seattle, I was very glad that I did so at a covered lot. Suddenly a torrential downpour hit with thunder, gusty winds and rain as if it was being poured out of a bucket. It was pretty warm all day, however, and it was cool to see flowers still blooming throughout the city as if it’s March or April.

Seattle has three seasons, spring, summer, and fall.

IMG_0060

 As usual, not being able to resist the temptation of all the wonderful foods at and around the market, I dropped a couple hundred on smoked salmon, fresh salmon, Rocky Mountain Chocolate apples, Beecher’s cheese curds, coffee, honey, honey cream, and a few other things. I don’t think anyone can resist buying at least something at this market because everything is just so good.

Pike Place Market Rainy Day

 My personal favorite always used to be Seattle’s Best Coffee at the corner in Post Alley. That “original” Seattle’s Best store closed last year, however and has since been replaced by some ginger beer place which I don’t care about. So now my favorite food spot at the market is probably Piroshki Piroshki which has some really great Russian bakery. Ok, well I might be a little biased, but it’s still really good.

Piroshki Piroshki Seattle

After spoiling myself at the market and stocking up with some things to bring back home when I leave, I left Seattle and started north towards Vancouver. The drive from Seattle to Vancity is about 2 hours, not bad, given the fairly large distance. The 70 (80) MPH speed limit makes up for it though. The border wait time was impressively short compared to last year. I was able to cross in about 10 minutes.

I5 U.S. - Canada Border Crossing

 And finally, after a four hour drive and a few stops to stock up with food for the week and buy a SIM card for my phone, I was in Whistler. A bit disappointing, seeing as the rain made it all the way up to Whistler, with more RAIN, not snow in the forecast for the entire week. Ullr, where the heck are you!? Bring us snow!

My Studio Suite at Whistler Village Inns

It’s getting really late, so I won’t make this a long one, but I made the King Salmon I bought at the market for dinner with some potatoes, and celebrated my arrival with some Snoqualmie Riesling.

Tomorrow, first day of skiing in this beautiful place. Lights start spinning at 8:30 AM, so I better by up by 6.

Whistler Wonder: Day -1

Shame on me.

As an avid traveler, it’s about time that I start writing about my adventures and sharing them with the world. Personally, I love reading other’s posts about their travel experiences – they are both interesting to know about and also extremely useful shall I decide to travel to those places myself. And if I’ve already been there, heck, it’s even better because then I get to see someone else’s perspective and see what I might have missed.

Anyway, this week’s vacation takes me to Whistler, British Columbia. I’ve been to Whistler a couple times before, but I haven’t written about it, so my goal is to keep a daily account of my travels (with skiing, spa, drinks and such, that might get a bit tough, however).

To start off the travels, I am taking the very familiar JetBlue 497, direct to Seattle. Why Seattle, you wonder? Because flying flying to Vancouver is both about three times more expensive, there are no direct flights from Boston, and the car rentals are outrageous. So I’ll take the four hour drive from Seattle instead.

Thankfully, like most other times, I’ve gotten to the airport about 2 hours before my flight – so some relaxation and news follow up sounds just about right. Not that you can really “relax” in the terminal, but JetBlue’s terminal is actually pretty nice. Spacious, WiFi-enabled, and with quite a few outlets to charge my gadgets.

As I am writing this, the bird has just pulled up,

JeyBlue's "Big Blue Bus" at BOS

Ready for a nice flight, some snacks and a few hours of solid reading time.

I fly all the time, and every time, I am fascinated by the sight of the runway at night, a “path to the sky”:

Path to the sky

Things were going well, and my flight was running only 20 minutes late as I got on board, but when the captain made the announcement, everyone was very surprised. “There’s some pretty bad weather out west, and I don’t think we’re going to have enough gas to make it all the way to Seattle, so we’re going to stop to refuel in Great Falls, Montana, so that should add about an hour to our flight time, we’ll keep you updated”. In all the years I have flown, I’ve never had to stop to “refuel”, so that was interesting. I guess the winds must have been very strong that night so the fuel burn was higher than usual.

Nonetheless, we made it to Seattle without stopping, the captain managed to save some gas by flying slow, so we got into Seattle about 40 minutes late.

Seattle turned out unusually Rainy, for January at least.

Night arrival at rainy Seatac