zurb-foundation

Full-screen responsive background image

半腔热情 提交于 2019-11-26 21:39:58
I am very new to Front-end development and Foundation. I am trying to get <div class="main-header"> to be a full screen image that scales down responsively. Can anyone tell me what I am doing wrong? It is scaling properly, but is not showing the full image. I also wanted the <div class="large-6 large-offset-6 columns"> to sit above it on a mobile device – is that possible? The HTML: <!-- MAIN HEADER --> <div class="main-header"> <div class="row"> <div class="large-6 large-offset-6 columns"> <h1 class="logo">BleepBleeps</h1> <h3>A family of little friends<br>that make parenting easier</h3> <

“Uncaught TypeError: a.indexOf is not a function” error when opening new foundation project

a 夏天 提交于 2019-11-26 21:21:56
I've created a new Foundation 5 project through bash, with foundation new my-project . When I open the index.html file in Chrome an Uncaught TypeError: a.indexOf is not a function error is shown in the console, originating in jquery.min.js:4 . I created the project following the steps on the foundation site, but I can't seem to get rid of this error. Foundation and jQuery look like they are included and linked up correctly in the index.html file, and the linked app.js file is including $(document).foundation(); Does anyone know what is causing this error? and what a solution might be? This

How can one import only variables and mixins from Sass stylesheets?

百般思念 提交于 2019-11-26 21:04:29
I'm using the Zurb Foundation 4 (S)CSS framework, and I'm running into an issue of massively duplicated styles. This is because in every file that I @import 'foundation' in, all styles from Foundation are also imported (rules for body , .row , .button and friends). This leads to long SCSS compile times and a hard to navigate web developer console in Chrome, as all of Zurb's styles are declared four or five times. To mitigate this, I've created a globals scss file, which contains the overrideable variables that Foundation uses (it's copy-pasted from foundation_and_overrides.scss , then

How do the Sass variables get assigned to CSS selectors with Foundation 4?

社会主义新天地 提交于 2019-11-26 18:31:44
问题 I've googled and searched all over this, and of course gone through the relevant documentation, but there is a couple of things about Foundation 4 I just can't seem to get my head around, relating to how Sass converts. I have set up Foundation with Compass, using the create project command, so Sass is running. The app.scss file is importing "settings" and "foundation", and being compiled with 'watch'. First half of my question: I understand that app.css is compiled from the component files in

AngularJS: initialize ZURB Foundation JS

这一生的挚爱 提交于 2019-11-26 15:46:20
问题 I am using both AngularJS and Foundation. To initialize Foundation JS, you have to make the following call: $(document).foundation(); What would be the best way to make this call in an AngularJS application? Code examples would be appreciated. Also, if I were to write a directive around a Foundation JS component, how could I ensure that Foundation is initialized? 回答1: You could $apply the code in order to bring it into the Angular framework. Here is an example using $rootScope with run and

Prevent href=“#” link from changing the URL hash

淺唱寂寞╮ 提交于 2019-11-26 12:27:00
问题 I have a site that already takes advantage of the hash in the URL and I don\'t want it changed. When I use Zurb Foundation and use href=\"#\" for the menu item, clicking on it removes the previous hash value. How can I override this behavior? Update: I think that it\'s better to stay with element because when I change it, it changes the styling that is bound to that HTML element. I always prefer when using with a design framework to stay with the default conventions and not mass with

Using a function in Sass is returning the string containing the name of the function rather than the result

生来就可爱ヽ(ⅴ<●) 提交于 2019-11-26 10:57:49
I'm trying Zurb Foundation 5. So, I've created a new project and try changing settings. When I changed, for example, $row-width: rem-calc(1170); in my-project/scss/settings.scss, it compiled (in my-project/stylesheets/app.css) into: .row { max-width: rem-calc(1170); } It seems like it doesn't know about rem-calc function. How to make it calculate rem-calc properly? cimmanon Your function doesn't exist. You must declare it (or import it from another file) before you use it. Sass does not throw errors for non-existent functions because they have a similar syntax to CSS functions. So it assumes

How to use google.maps.event.trigger(map, &#39;resize&#39;)

筅森魡賤 提交于 2019-11-26 09:48:21
问题 I am new to JS, and have found the answer to a previous question, which brought up a new question, which brought me here again. I have a Reveal Modal that contains a Google Map API. When a button is clicked, the Reveal Modal pops up, and displays the Google Map. My problem is that only a third of the map is displaying. This is because a resize trigger needs to be implemented. My question is how do I implement the google.maps.event.trigger(map, \'resize\')? Where do I place this little snippet

Full-screen responsive background image

本小妞迷上赌 提交于 2019-11-26 07:59:43
问题 I am very new to Front-end development and Foundation. I am trying to get <div class=\"main-header\"> to be a full screen image that scales down responsively. Can anyone tell me what I am doing wrong? It is scaling properly, but is not showing the full image. I also wanted the <div class=\"large-6 large-offset-6 columns\"> to sit above it on a mobile device – is that possible? The HTML: <!-- MAIN HEADER --> <div class=\"main-header\"> <div class=\"row\"> <div class=\"large-6 large-offset-6

How can one import only variables and mixins from Sass stylesheets?

允我心安 提交于 2019-11-26 07:47:51
问题 I\'m using the Zurb Foundation 4 (S)CSS framework, and I\'m running into an issue of massively duplicated styles. This is because in every file that I @import \'foundation\' in, all styles from Foundation are also imported (rules for body , .row , .button and friends). This leads to long SCSS compile times and a hard to navigate web developer console in Chrome, as all of Zurb\'s styles are declared four or five times. To mitigate this, I\'ve created a globals scss file, which contains the