Hacker News new | past | comments | ask | show | jobs | submit login
CSS Hat translates Photoshop layer styles to CSS3 (csshat.com)
167 points by benackles on May 17, 2012 | hide | past | favorite | 75 comments



Hi guys, I'm one of CSS Hat devs and I'd like to thank you for your interest and show a little bit more:

This is the output of current version of CSS Hat: http://jsfiddle.net/tomaskafka/ZXgqN/


Offtopic: can I have a Piffle invite? I'm very curious; we try out all these tools all the time at our company and none of them are really good. This looks promising, but that's the outside only for now of course.


Oops - I didn't expect a comment after the initial wave, so I stopped watching the thread. At this time, I cannot advise you anything better than signing up at http://csspiffle.com - you'll be then first to know our news :).


why '90deg'? using no direction, and otherwise 'to bottom' etc. for the non-prefixed and 'top', 'left' etc. for the prefixed gradients seems easier to understand.


Thanks for an idea - so far we just take the angle Photoshop gives us, but it is true that we could convert it to words when the angle is multiple of 90 degrees :)


Fireworks CS6 has something related to this. If you select an object in Fireworks, you can get the CSS which will build the shape, gradients, curved borders, etc.

http://layersmagazine.com/new-css3-support-in-dreamweaver-cs...


Yep - kudos to Adobe for doing this; we discovered this while working on CSS Hat. We are in Photoshop, and from CS4 up, though :) Tomas (CSS Hat dev)


"Hate Flash? Click here!" That one's clever :)


Mine said "hate IE6?". In any case I think it would have been both funny and effective if it led to their products page, something like here is how we will can take your pain away..Redirecting to twitter? I didn't like it.


Agreed. If they show me something awesome, that might give me a reason to send out a tweet. As it stands, I just closed the window.


Pretty scummy, more like.


I think "scummy" is a bit of an overstatement. I would have preferred it if there was a message first explaining how CSS Hat helps you stop using Flash (I'm assuming that was the intent). I'd be more likely to tweet in that case.


It looks like just a joke to me, I imagine it came from 'How do we get all these web developers to click on this link and maybe tweet'


I don't use Photoshop, but the hue-shifting glowing hat and floating words are a pretty cool effect.


Thanks - I'll pass it on to Peter who made the effect ;)


Oh, common. Who keeps changing the submission titles? It is really getting out of hand lately. What was wrong with "{css:hat}" ?


I think because "{css:hat}", while interesting and amusing, doesn't accurately display what it does.


The page title itself says "CSS Hat"

<title>CSS Hat translates layer styles to CSS3 code</title>


I was just talking about this with colleagues. If some piece of photo manipulation software centered its features for the web developer and actually outputted the CSS for shadows, blend modes, etc. I am sure that many would be interested. Photoshop is great, don't get me wrong, but it is shoehorned into being a web development tool. It isn't by nature. Fireworks and tools like it were never well rounded enough. Now we're in an era where CSS can actually do a lot of the stuff Photoshop is capable of.

Can't wait to try this out.


Why is the page calling me a fag?


That says "Faq". Notice how the loopy part of the descender goes to the right. I don't know why it's lowercased.


Thanks for the notice, it's fixed now.. :)


That is exactly what I though :)


Definitely want text-transform:uppercase on that acronym with that font.


This is huge if they can pull it off. I wonder how accurately they can make it happen. Even if they're simply able to position layers exactly the same as in PS, it's already something I would use as being extremely useful. This could virtually allow you to not code in HTML/CSS3 anymore - which is something I really hate to do.

So would it output the HTML elements and give you CSS3 code for it? How about <forms> and other elements that aren't just simply <div>'s? Can you make those?


Hi sktrdie, we considered this, but we think that the output would become just a mess of absolutely sized and positioned divs - and that's not how websites should be made.

It is a coder's job to bring in the semantic structure and we merely aid to assist her/him - so CSS Hat will 'only' transform layer's fills and styles to CSS3. Hope that's cool :).

Tomas - one of CSS Hat devs


It's just blending options from photoshop. It's not layout/positioning/sizing, although that would be boss.


I don't think this goes beyond gradients, patterns, shadows, etc... Still looks useful though.


I wonder how many people still use Photoshop to create mocksups first and then move to HTML/CSS. Ever since CSS3 became popular I create my mockups directly in HTML/CSS3.


I would say pretty much ever designer I know still use Photoshop to design first. I also know that the PSD to HTML businesses do HUGE turn over each year, so I think this is very much in demand.


The only time I don't use Photoshop is when I'm doing a super simple design (very flat, no graphics) but other than that I'm pushing pixels in Photoshop first before I jump into HTML & CSS.


It's still pretty prevalent. I'm currently consulting for a largish e-commerce site, and their creative department sends all their page designs over as PSDs.


I prefer Illustrator, it's more "element-oriented" if you will. Easier to move things around. Even if it's lacking a good UI for styling.


A-men.

If you're missing the UI for styling, you might try Fireworks.

The idea that Photoshop should be used as a layout tool is an unfortunate accident of history -- it was/is the household name for image manipulation as most designers and developers hit the web. But while it's good for raster/photo editing, sets of pixel layers doth not a good layout/design tool make.

Illustrator's a lot better for this. And Fireworks is made for web layout and screen graphics, has a great mix of vector and raster tools, and is evolving some really sophisticated export abilities including some of the CSS export facilities CSS Hat is doing.


Unfortunately, Illustrator is essentially abandonware at this point. It's so hobbled by design defects and other bugs that you're much better off with Corel Draw, even if you have to run it in a VM on a Mac.

This is just one example:

http://farm3.staticflickr.com/2362/1800773495_d1f776e335.jpg

Many (most?) vector-drawing applications let you select only the items that are fully enclosed by a selection rectangle. So if you wanted to select only the circles in that image, you'd need only to draw a selection rectangle around them.

Illustrator gives you no way to do this. Every shape that comes into contact with the selection rectangle (or even the path of the lasso tool) is selected. You can fire up Windows and do the whole thing in Corel Draw in the time you'll waste tediously clicking on everything in Illustrator.


In your example, why not select the non-circles with one rectangle select, then invert the selection by Shift-rectangle selecting everything?

As an aside, the lasso is a "direct selection" tool, operating on individual paths rather than shapes, not that this helps in your example. But it'd work well if I wanted to select, say, only the bottom side of your rectangle, for essentially the reason you dislike.


That works only in a simple example like this, where you can make contact with all of the undesired objects without making contact with the desired ones. This is almost never the case in a real-world illustration.


Looks like they are about to release a tool for that too http://csspiffle.com/


Here's their pitch: http://pitch.csspiffle.com/ Looks quite impressive. The idea is really not new, I've been waiting for more than 4 years now for a good HTML5 tool to go beyond Photoshop/Illustrator/Fireworks/Whatnot. I hope their app lives up to the pitch.


Cool pitchdeck, but the navbar is really distracting. Should just be persistent, instead of constantly drawing my eye back up to it.


They look like a cool team of developers!! congrats to them! Glad to see some amazing projects and awesome team back in my old continent!


Always Photoshop first. Last time (admittedly a while back) I read about someone creating their design directly in HTML/CSS, it was a rubbish design.


Most people who work in an agency still do it this way as the roles are divided by specialty.


This is like starting a big coding project without first writing a plan.

It's best to prototype first be it on paper or photoshop.

Otherwise your design is shaped by programming requirements, rather than a fully thought out plan/experience.


I always use Photoshop for my mockups for clients, but I'm still pretty new to web design.

I've only been at it about 5-6 months, with 1-2 years experience in graphic design. Any advice?


Two things from someone with 12 years in professional web design: Switch to Adobe Fireworks now before you get too used to Photoshop. And ignore all of the engineering advice here about jumping straight to CSS/HTML.

Good web design begins much earlier than Photoshop/Fireworks, and doesn't even move to the graphics/proof stage until you've made dozens of decisions beforehand that will influence your design (think business goals, marketing messaging, platform, audience etc.) HTML/CSS is almost one of the last steps in a complete web project.


Yeah, I would take this as a grain of salt like any other advice. Fireworks isn't necessarily better, either.

I would definitely create buttons or icons in Illustrator (but you still don't have to do that), and do a lot of everything else in Photoshop. You can try Fireworks and see if it's your cup of tea, but Photoshop definitely isn't going anywhere as far as standard practice for awhile, at least from what I've seen. I've worked with startups all over the country and top web development firms and still all I see is Photoshop/Illustrator.

Not to say Fireworks is bad or you shouldn't use it, but take it as a grain of salt and see what works best for you. It never hurts to learn new things.


Can you expand on why you recommend Fireworks over Photoshop, please?


1. an Illustrator-style object selection engine so you don't have to do that "right-click > pick layer from list" BS. 2. Multiple versions of one screen in a single file. Think collapsed/uncollapsed states of a form or all of the tabs of a form. 3. Small file sizes because it uses PNGs. 4. Ability to import PSDs and use style from PSD layers. Same with Illustrator files. 5. Customizable patterns UI so you can drag and drop custom buttons, etc. 6. Built in prototyping. Just click-through stuff using hotspots, but it's a good way to see if an interaction is going to be worth pursuing further or not.


> 1. an Illustrator-style object selection engine so you don't have to do that "right-click > pick layer from list" BS.

Ctrl/Cmd+click with Photoshop move tool automatically selects the layer that is under your mouse cursor raster. Not 100% Illustrator-style but less BS than selecting from lists.


I think getting better at CSS would be my only advice. I got better at it by doing tutorials on https://css-tricks.com/.

One other thing I do is try to make sure I complete my web design without having to use any image or Javascript. When you limit yourself in this way, you find ways to accomplish in CSS/CSS3 and get better at it eventually.



Photoshop is still pretty popular in web agencies.


"Now waiting for App store approval" - does that mean Mac only?


No, it is not :) Although the initial release will be for Mac


Yep


Why and how is a Photoshop plug-in being sold only through the App Store?


This could be good -- any additional info that you can share? The details are somewhat scant and I'm greatly interested.


Hi erable, I can show you a sample CSS generated by current version: http://jsfiddle.net/tomaskafka/ZXgqN/


What would you like to know? Ask on team@csshat.com


It looks like it only exports webkit-compatitble CSS. If this is the case, this would be really disappointing.


Hi, I'm dev from CSS Hat team - we will export regular CSS3, vendor extensions (webkit,moz,o) are optional. Thanks for interest! :)


Not nearly as disappointing as the fact that Webkit has not become a standard in all browsers. We should all be working on a single rendering engine. Webkit has won, and should be the standard.

People/organizations can continue to experiment on components of that. V8 vs Nitro etc... We'll just have beta/dev forks of Webkit that can eventually be merged back into the core.

Browser fragmentation is fine. It's the rendering engines that are killing us.


the html5 spec specifies exact parser behavior, and ensures the same rendering across all compliant browsers. If we did standardize rendering engines (which could /never/ happen, for an incredible number of sociopolitical reasons), what fragmentation would exist?

Competition creates innovation.


CSS prefixes are dumb, why not just drop them?



From the link:

"Photoshop is required to use CSS Hat."

From their main site:

"CSS Piffle. No more photo editing software for web design!"

Eating their own dog food?


Well, a lot of people are stuck in Photoshop, unfortunately. That way there could be some transition from PS to straight HTML/CSS.


What about exporting Stylus (/w nib) or at least LESS?


It's not generating total stylesheets, just blocks of CSS from what I can tell. Although an option for loosing the ; and maybe a couple features SASS/LESS has would be nice, and shouldn't be too hard to pull off.


Any news on when the beta version will be released?


CSS hat is going live next week :) So you can get it then ;)


What About Piffle? Been waiting far too long now keep checking every day.


How much is it going to cost? :P


clever name




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: