When designing something for the web, is it a better to focus first on the layout and then on the style or the reverse?
CSS was designed (unfortunately) to lump layout in with styles. It really doesn't matter whether you focus on layout or colors or fonts first. What is important is to focus on content first. That is the most important distinction: content v. styles. Content drives everything. Content drives layout, and font and colors come in to reinforce everything.
Since there's not an established rule for this, I think this is very ambiguous, it depends on the person's developing (the layout, not coding or writing a program) style.
A few months ago at job we had a serious debate about this. Everyone has different points of view. We finished with the idea that "it depends in the way your brain works".
You can think that implementing the interface once the code is written is easier than designing the interface and next coding. But there was something in common in both ideas, and it was that first you need to make a classes diagram and a pre-design (<joke>everyone knows it will always change </joke>). So you can work in any case with "the final" product and you are counting with all the functionalities it has to have.
In my opinion, it also depends with the type of interface or program you want to create.
Here some examples:
I would first code and then implement interface:
I would first implement interface and then code:
So we can say that depending on the weight of each one you will be more comfortable to work a way or another.
Yes so go with the layout first, you can have the style in mind and it also will get influenced by similar aspects that help form the layout.
Ideally when you go to start the design/build of a website you will have the content (text, photos & brand guidelines) and desired outcomes that the website needs to achieve.
I would recommend taking in the above with the strategy of the site to start with a wireframe (pencil sketches of how the content needs to be laid out to work effectively to get the desired results) which will inform the layout.
Layout before style is good option. Layout is like a skeleton for the styling. It give very good base for styling.
Styling can be achieved vice versa but it's time consuming when we do style before layout.
Even more important than style or layout, I would design around the content and let it dictate whether style of layout should have priority. In my past experience, I find that people try and do layout and realize that the content doesn't allow (or isn't structured) to say for example responsive design. Alternatively, people try to focus on style and find that the complexity of information means that the styling options also become too difficult to implement consistently.
So I think let the data or content make the decision for you and not the other way around.