Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
The Merkinman
Apr 22, 2007

I sell only quality merkins. What is a merkin you ask? Why, it's a wig for your genitals!
I know there is -moz-appearance:none and -webkit-appearance:none to 'reset' stuff like <select> to make it less like the OS/Browser and give a little more control to style it. However, if something previously set a <select> to -moz-appearance:none, is there some new value to then make the select box back to the default OS/Browser look?

Adbot
ADBOT LOVES YOU

Chris!
Dec 2, 2004

E

samglover posted:

I'm going to be making some design changes to our site in the next couple of months, and I'd like to move off our fully-custom WordPress theme to Zurb Foundation as framework. It sounds like the best way to do this is with Sass.

What's the best way to get up and running on Sass and Foundation? Should I just take this class, or do I need to take some of the other classes, first?

I'm sure this has been answered elsewhere in this thread, but I'm not seeing it as I skim.

That class will probably make things easier! Personally, I didn't take any classes, just downloaded the vanilla version of the framework from the Zurb site and messed around with the pre-made templates until I understood the grid system etc. It's really pretty simple to use.

The Zurb forum is pretty useful if you have any questions, or here of course.

If you're using Wordpress, you can use FoundationPress which is basically a blank WP theme with all of Foundation's features, made with SASS so you can easily turn off the elements of Foundation you don't need and use all of the benefits of SASS.

Bear in mind that there is a new version of Foundation very nearly ready to drop, which apparently has big changes to the grid system - I read an announcement about it on the Zurb Twitter, don't think they've announced an actual date beyond "very soon" though.

Bastard
Jul 13, 2001

We are each responsible for our own destiny.
If you're willing to pay for it, you can also use something like Beanstalk or Deployhq for your deployments (beanstalk does both git hosting + deployments, deployhq only does deployments).

Spatulater bro!
Aug 19, 2003

Punch! Punch! Punch!

Do any of you use Grunt for deployment? I just came across grunt-ftp-deploy. There's also a grunt-sftp-deploy .

Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice

caiman posted:

Do any of you use Grunt for deployment? I just came across grunt-ftp-deploy. There's also a grunt-sftp-deploy .

I did for about three days, then somebody made Gulp, and I dropped Grunt like a hot potato.

Heskie
Aug 10, 2002

Lumpy posted:

I did for about three days, then somebody made Gulp, and I dropped Grunt like a hot potato.

I got into Gulp recently and really like it.

Is there something for deployments with Gulp that you use? I've seen gulp-sftp but I'm thinking something more like Capistrano that handles rollbacks and shared directories etc.

spacebard
Jan 1, 2007

Football~

caiman posted:

Do any of you use Grunt for deployment? I just came across grunt-ftp-deploy. There's also a grunt-sftp-deploy .

I use grunt-rsync to deploy applications configured with -rtlDPvzc --delete. I had some problems with the -a flag.

So I usually do a custom grunt build task (which would run tests, compass, concat/copy) and then grunt deploy:hostname. Hopefully one of these days I'll have a build server for my client so those commands are just run by jenkins or whatever to deploy an application and its heavy content.

Client is pretty invested in Grunt at the moment, but Gulp is pretty sweet.

My Rhythmic Crotch
Jan 13, 2011

Deploying the back-end:
code:
#!/bin/bash

test_url="some_test_url"

site_list="server1.mycompany.org
server2.mycompany.org
server3.mycompany.org
server4.mycompany.org
server5.mycompany.org
server6.mycompany.org"

for site in $site_list
do
    mvn clean compile war:war -Dsite=${site} -Dother_option=${whatever}
    scp target/app-${site}.war root@${site}:/some/path/to/webapps
done

for site in $site_list
do
    echo "Checking: ${site}${test_url}"
    while [ `curl -s -o /dev/null -w "%{http_code}" "http://${site}${test_url}"` != "200" ]
    do
        echo "Not online. Sleeping 2 seconds."
        sleep 2
    done
done
Deploying the front-end:
code:
svn up
It can be as simple or as complicated as you want it to be. Deployment was a loving nightmare at my last job (more traditional applications, but still) so I much prefer simplicity.

Subjunctive
Sep 12, 2006

✨sparkle and shine✨

caiman posted:

Also, can you name some examples of [tools for automating publish to production].

git receive hooks or equivalent are popular, or a high-frequency cron job pulling from git if you want to go the other way.

It's important for it to be atomic, though. You want the result of an interrupted or errored push to be the old version still running.

fletcher
Jun 27, 2003

ken park is my favorite movie

Cybernetic Crumb

Lumpy posted:

I did for about three days, then somebody made Gulp, and I dropped Grunt like a hot potato.

drat I didn't even get around to trying Grunt yet, and there's already a new hotness? How can anybody keep up with this stuff.

Also, what makes it better?

Maluco Marinero
Jan 18, 2001

Damn that's a
fine elephant.

fletcher posted:

drat I didn't even get around to trying Grunt yet, and there's already a new hotness? How can anybody keep up with this stuff.

Also, what makes it better?

Rather than big config files, your build steps are code. Its a really nice structure for combining various build steps without passing files around constantly.

My experience is gulpfiles are much cleaner to maintain, extend and organise in general. Grunt files get to freaking massive levels of configuration on non trivial projects, that are hard to maintain and require a large amount of temporary files as you progress through build steps.

Thermopyle
Jul 1, 2003

...the stupid are cocksure while the intelligent are full of doubt. —Bertrand Russell

Every time people start talking about gulp/grunt/whatever, it just starts getting me irritated about how ridiculous the whole web deployment system is.

nexus6
Sep 2, 2011

If only you could see what I've seen with your eyes

Thermopyle posted:

Every time people start talking about gulp/grunt/whatever, it just starts getting me irritated about how ridiculous the whole web deployment system is.

Do you mean with or without gulp/grunt/whatever? I don't use anything like that through a combination of ignorance about them and stubborn/unchanging business processes at work.

Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice

Heskie posted:

I got into Gulp recently and really like it.

Is there something for deployments with Gulp that you use? I've seen gulp-sftp but I'm thinking something more like Capistrano that handles rollbacks and shared directories etc.

For deployments I use a Makefile which runs an rsync command. One could use a shell task to have gulp or grunt do the same. If possible, favor rsync over (s)FTP where possible, as it is easier and faster in my experience.

Thermopyle posted:

Every time people start talking about gulp/grunt/whatever, it just starts getting me irritated about how ridiculous the whole web deployment system is.

I think 90% of the problem is that there's something new out every month! and being the dumbasses we are, we all jump ship to it. Then, when flaws are discovered, somebody else writes something totally new instead of fixing the old, so we are stuck with an immature set of tools no matter how long the problem has been around. Maybe if we would stop reinventing the wheel, we would have one nice wheel instead of a not so good wheel graveyard...

Now if you'll excuse me, I need to go read up on all he new hotness that got developed while I wrote this post.

Heskie
Aug 10, 2002

Lumpy posted:

For deployments I use a Makefile which runs an rsync command. One could use a shell task to have gulp or grunt do the same. If possible, favor rsync over (s)FTP where possible, as it is easier and faster in my experience.

That makes sense. The reason I ask about Gulp specifically is because I'm using it for everything else and I'd rather not bury my projects under a dozen tools with their own dependencies and config files.

I've been living under a rock with regards to web tools so when I finally decided to look into Grunt it had already been 'replaced' by Gulp.

I guess I could always set up a git hook on my master branch to deploy to production? I've been using Gitflow which is super easy with Sourcetree, so this could work?

Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice

Heskie posted:

That makes sense. The reason I ask about Gulp specifically is because I'm using it for everything else and I'd rather not bury my projects under a dozen tools with their own dependencies and config files.

I've been living under a rock with regards to web tools so when I finally decided to look into Grunt it had already been 'replaced' by Gulp.

I guess I could always set up a git hook on my master branch to deploy to production? I've been using Gitflow which is super easy with Sourcetree, so this could work?

Understood. I keep my deployment stuff out of gulp on purpose, because I want there to a a conscious decision by me to type 'make rsync_upload' so I don't do something stupid. If you are not as awful as me, then doing it within gulp / grunt is fine.

My workflow is generally: gulp dev which runs watch on all my various bit and pieces and updates as I save things. I run a local web server, so my environment behaves like production. Once I am a happy camper, I Ctrl-C gulp, and do make rsync_upload which syncs all the stuff that the server needs. Being able to have an exclude file is another nice thing about rsync! (Not pictured: lots of commits to source control)

Thermopyle
Jul 1, 2003

...the stupid are cocksure while the intelligent are full of doubt. —Bertrand Russell

nexus6 posted:

Do you mean with or without gulp/grunt/whatever? I don't use anything like that through a combination of ignorance about them and stubborn/unchanging business processes at work.

I mean that there is even a need for gulp/grunt/whatever.

kedo
Nov 27, 2007

Thermopyle posted:

I mean that there is even a need for gulp/grunt/whatever.

I don't know, uploading poo poo via FTP and dropping crap into databases is pretty drat simple. I have a few buddies who use Gulp and swear by it, but I am currently too lazy to bother with it. Guess I'll continue wasting my time manually minifying poo poo and whatever until I care more.

Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice

kedo posted:

I don't know, uploading poo poo via FTP and dropping crap into databases is pretty drat simple. I have a few buddies who use Gulp and swear by it, but I am currently too lazy to bother with it. Guess I'll continue wasting my time manually minifying poo poo and whatever until I care more.

It's convenience. Rather than "make change, command-tab to terminal, type command for thing that converts my SASS or JSX or whatever" I run 'gulp dev' and work for hours w/o the need to switch back to terminal all the time. I wrote a bash script that I run in new projects that asks me "Using JS? Using React? Using SASS?" then builds a gulpfile for me, installs everything and starts the watcher task. Do I *need* Gulp? Not at all. Is it nice to not have to manually compile SASS / convert JSX 85761242315321 times an hour? Hell yeah.


\/\/ yeah, what he said too.

Lumpy fucked around with this message at 20:51 on Sep 12, 2014

spiritual bypass
Feb 19, 2008

Grimey Drawer
Deployment and build tools aren't just about convenience. It ought to be built and deployed exactly the same way every time so you don't push out something broken. The need for more consistency is even stronger if you're working in a team.

Bastard
Jul 13, 2001

We are each responsible for our own destiny.

Lumpy posted:

Do I *need* Gulp? Not at all. Is it nice to not have to manually compile SASS / convert JSX 85761242315321 times an hour? Hell yeah.

Do you really manually compile each and every change? This is why you create a grunt/gulp watch task. Nevermind, I misread :downs:

Ahz
Jun 17, 2001
PUT MY CART BACK? I'M BETTER THAN THAT AND YOU! WHERE IS MY BUTLER?!
Would I care about some of these tools like grunt/gulp for deployment when I'm using an IDE like Pycharm for a Django project? For example, Pycharm has built-in watchers that compile my LESS files for me on every change.

What else do I need? (not sarcastic)

I haven't gotten to deployment yet, but I would like to get started the right way when I do.

streetlamp
May 7, 2007

Danny likes his party hat
He does not like his banana hat
My small team uses Grunt for:

- autoprefixing
- combining media queries (we do inline media queries)
- minifying, concatenating (SASS and JS)
- JS hinting
- livereload
- image crunching
- devcode, strips out stuffs depending on environment

Most of these are only run on the production task of course

Thermopyle
Jul 1, 2003

...the stupid are cocksure while the intelligent are full of doubt. —Bertrand Russell

Ahz posted:

Would I care about some of these tools like grunt/gulp for deployment when I'm using an IDE like Pycharm for a Django project? For example, Pycharm has built-in watchers that compile my LESS files for me on every change.

What else do I need? (not sarcastic)

I haven't gotten to deployment yet, but I would like to get started the right way when I do.

No, you can do all of it through PyCharm.

Though, if you're doing Python stuff, you should use Heroku or the like for your deployment anyway! :colbert:

Maluco Marinero
Jan 18, 2001

Damn that's a
fine elephant.

Ahz posted:

Would I care about some of these tools like grunt/gulp for deployment when I'm using an IDE like Pycharm for a Django project? For example, Pycharm has built-in watchers that compile my LESS files for me on every change.

What else do I need? (not sarcastic)

I haven't gotten to deployment yet, but I would like to get started the right way when I do.

The problem with an IDE doing all that stuff is that there is certain elements required to actually do work on your project, that are tied to the IDE and not into the project files. I think the target should be always to have a project repository contain everything a developer would need to get started from scratch given some base dependencies like Node, Vagrant, Virtualbox, installed. If you do this from the get go, you will have the assurances that your build and dev environment are reliably repeatable.

My minimum standard for my projects these days is to have Gulp for working tasks, front-end compiling, etc, and Vagrant for creating a VM for holding the backend dev. That way I can work with a designer/dev who has no familiarity with Django, give them the project repo, and all they need to do to run up a server is:

code:
npm install
vagrant up
vagrant ssh

./run_server.sh
That saves a lot of time which I'd really rather spend devving than janitoring.

Thermopyle
Jul 1, 2003

...the stupid are cocksure while the intelligent are full of doubt. —Bertrand Russell

Maluco Marinero posted:

The problem with an IDE doing all that stuff is that there is certain elements required to actually do work on your project, that are tied to the IDE and not into the project files.

PyCharm/WebStorm can do the exact things grunt/gulp/whatever does. Unless your point is that you should have your grunt/gulp/whatever config as part of your repo. You can do that with PyCharm as well.

In fact, you can configure PyCharm to integrate with grunt and run your tasks and stuff.

Maluco Marinero
Jan 18, 2001

Damn that's a
fine elephant.
If you can guarantee that every person in your shop and all your potential contractor resources use PyCharm/WebStorm, go for it. If not, they should not be tied to the project like that. My point is that you should be able to onboard developers with a fairly minimum set of dependencies, IDE is not always a good dependency to have compared to say a base like Node/Vagrant, because they are both freely available with installers on all platforms.

Subjunctive
Sep 12, 2006

✨sparkle and shine✨

Just mount the web server's filesystem over the network and edit it live. :black101:

Eleeleth
Jun 21, 2009

Damn, that is one suave eel.

Subjunctive posted:

Just mount the web server's filesystem over the network and edit it live. :black101:

I understand that this is a joke, but I'm currently dealing with a contractor at work who does just this, so gently caress you. :smith:

Maluco Marinero
Jan 18, 2001

Damn that's a
fine elephant.
Yeah, I did a contract job last year where I was required to ssh in to edit project files with vim, and also restart the services manually. Thank god it was for only 2 weeks on an uncomplicated site.

:911: never again

Chenghiz
Feb 14, 2007

WHITE WHALE
HOLY GRAIL
I've been introducing stuff like grunt very gradually at work and I can see the value, especially for stuff like React where being able to recompile the jsx files live is pretty great. Not sure I want to jump down the browserify rabbit hole, but working with Node I can see the benefit of just being able to toss in node modules to solve problems I'd have some custom lib sitting around for previously.

Watching the .net devs at work struggle for a whole day to get up and running with a visual studio solution and all its stupid dependencies is enough to keep me off the IDE path for now. Sublime and Terminal are quite enough.

Thermopyle
Jul 1, 2003

...the stupid are cocksure while the intelligent are full of doubt. —Bertrand Russell

Maluco Marinero posted:

If you can guarantee that every person in your shop and all your potential contractor resources use PyCharm/WebStorm, go for it. If not, they should not be tied to the project like that. My point is that you should be able to onboard developers with a fairly minimum set of dependencies, IDE is not always a good dependency to have compared to say a base like Node/Vagrant, because they are both freely available with installers on all platforms.

Oh yeah, I agree with this. I was just saying that the way your original post was worded it sounded like you might be saying you couldn't share your build configuration with PyCharm/WebStorm.

down with slavery
Dec 23, 2013
STOP QUOTING MY POSTS SO PEOPLE THAT AREN'T IDIOTS DON'T HAVE TO READ MY FUCKING TERRIBLE OPINIONS THANKS

Maluco Marinero posted:

Yeah, I did a contract job last year where I was required to ssh in to edit project files with vim, and also restart the services manually. Thank god it was for only 2 weeks on an uncomplicated site.

:911: never again

What's so bad about this? git/vim/linux is pretty much ideal for remote editing, especially if you use dotfiles

Raskolnikov2089
Nov 3, 2006

Schizzy to the matic
Anyone know any good tutorials for styling forms? Specifically text input areas.

Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice

Raskolnikov2089 posted:

Anyone know any good tutorials for styling forms? Specifically text input areas.

Here's mine: you probably shouldn't.

Much like scroll bars, form elements should look like form elements. Make sure you do actual user testing with real humans on your styled version and a normal form. People expect certain thing to look and behave certain ways, forms is one of those things where what is "obvious" to you as a designer can really screw up normal folks. Not saying don't ever, but be very careful and TEST

Maluco Marinero
Jan 18, 2001

Damn that's a
fine elephant.

down with slavery posted:

What's so bad about this? git/vim/linux is pretty much ideal for remote editing, especially if you use dotfiles

Its the best of a bad situation though, editing remotely in a shared environment where you can't work on the same file as another , encounter horrible lag (here in Australia good internet is hard to find), and no reliable way to do TDD because of the way it was all setup.

Nothing against vim, the shell, or fit, they're my primary dev tools, but being stuck remoting onto a server that I didn't set up, not really set up well for isolated work, is terrible and took a sledgehammer to my productivity.

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.
Today's episode of CSS is awesome: http://jsfiddle.net/aLvsxLmf/1/

The example will be clearer than anything I write, but basically you can defeat word-wrap: break-word with a bunch of images interspersed with empty inline elements, like <img><b></b><img><b></b>.... Is there some magical CSS property I can use here?

edit: Safari on iOS 8 is my target. Happens in Safari 7 on OS X 10.9 too. Chrome 37 works as I want it to. Updated fiddle.

pokeyman fucked around with this message at 05:43 on Sep 14, 2014

Subjunctive
Sep 12, 2006

✨sparkle and shine✨

pokeyman posted:

Today's episode of CSS is awesome: http://jsfiddle.net/aLvsxLmf/

The example will be clearer than anything I write, but basically you can defeat word-wrap: break-word with a bunch of images interspersed with empty inline elements, like <img><b></b><img><b></b>.... Is there some magical CSS property I can use here?

Neither of those wrap for me in the Awful Browser/Safari/Chrome-iOS, which is actually what I would expect without a specified width, but both wrap in Chrome on Windows. Hmm. Annoying to experiment, since I can't seem to edit fiddles on iOS.

Untested thoughts: could you :before a zero-width non-joiner for <img>? try break-all instead of break-word?

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.

Subjunctive posted:

Neither of those wrap for me in the Awful Browser/Safari/Chrome-iOS, which is actually what I would expect without a specified width, but both wrap in Chrome on Windows. Hmm. Annoying to experiment, since I can't seem to edit fiddles on iOS.

Untested thoughts: could you :before a zero-width non-joiner for <img>? try break-all instead of break-word?

Yeah Chrome actually does exactly what I want here. I'll edit my post to mention which browsers I'm messing with (iOS 8 Safari). I guess basically I want Chrome's behaviour in Safari.

img:before does nothing, which is apparently expected behaviour? anyway it's out.

break-all does work but it means that other lines will get wrapped in the middle of words and that's awful to read.

edit: I updated the fiddle to put a lil width on and show why break-all is terrible.

pokeyman fucked around with this message at 05:43 on Sep 14, 2014

Adbot
ADBOT LOVES YOU

Subjunctive
Sep 12, 2006

✨sparkle and shine✨

pokeyman posted:

img:before does nothing, which is apparently expected behaviour? anyway it's out.

Duh, yes, img has no descendants.

In your example you might be able to :before on the b, or even (ha) on *. Hrmph.

I'm going to update this iPad to 8 tomorrow, but in the interim one more weird thought: set content: "" on all img as well?

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply