I have an app built using React with Parcel. I am attempting code splitting via modules, but have a strange issue.
On my home page, I am importing a module that has its own css. When the component is showing on the page, there is one single css rule that is showing as 'undefined' in the inspector.
When I run this in my local, or on another page in my app such as About, the rule is recognized and everything works perfectly.
I've tried everything I can think of, but I am lost as to what to try next.
Here's the code in my js file:
<div className={styles.content__move + " content__move"}>
<div className={styles.columns + " columns"}>
<div className={styles.column + " column"}>
The rule being ignored is 'styles.columns'. As you can see it is in between styles.content__move and styles.column, and BOTH of those are working as expected.
When inspecting I see this:
<div class="_content__move_31d79 content__move">
<div class="undefined columns">
<div class="_column_31d79 column">
<div class="_column__img_31d79 column__img _bg4_31d79">
But if I add the module on another page, it shows correctly as:
<div class="_content__move_31d79 content__move">
<div class="_columns_31d79 columns">
<div class="_column_31d79 column">
<div class="_column__img_31d79 column__img _bg4_31d79">
What might I be missing?
I'm not sure what the problem was, but I renamed the class in the JS and CSS, rebuilt, and it started working right away. I would suggest to try this before changing style loaders for anybody that has the same problem.
I added:
class="styles.columns_f"
in the JS, and in the SCSS:
.columns_f {...}
Ran a production build, and that was the fix.
Related
I recently started learning web development and I was playing around with a RoR app, to which I added the bootstrap gem using the command:
bundle add bootstrap
It went fine, I changed the /app/assets/stylesheets/application.css extension to .scss, I then added
#import "bootstrap";
#import "bootstrap-sprockets";
to said file, and restarted the server. Now I could clearly see that the font changed, and started playing around with different properties. I created some colourful buttons, a callout and then I wanted to put a jumbotron at the top of the page.
I realised however, that it had no background colour, even though it should be gray. Everything else seems to work, but I can not get it to have a background for some reason, and there seems to be noone having the same problem which is not a good sign.
This is how it looks
(https://i.stack.imgur.com/R630H.png)
<div class="container">
<div class="jumbotron text-center">
<h1>
This is my header
</h1>
<p>
Hello this should maybe someday be a jumbotron
</p>
</div>
<div class="callout callout-primary">
<h4>Primary Callout</h4>
This is a primary callout.
</div>
<%= link_to "About me", 'about_me', role: "button", class: "btn btn-info"%>
<button class="btn btn-success">Green button</button>
</div>
Bootstrap version: 5.2.2, Ruby version 3.1.2, RoR 7.0.4
I have no clue what is going wrong since the other elements seem to work. Any help is much appreciated. Link to my full repository
I tried using a full html5 template and adding
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap#4.3.1/dist/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
To the files , which did make it work, but the whole point of installing the gem is so I dont have to do that right?
I'm afraid Bootstrap v5.2 does not have a jumbotron anymore as v4 did.
Try this instead: https://getbootstrap.com/docs/5.2/examples/jumbotron/
Also you can check out the available components for v5.2 here: https://getbootstrap.com/docs/5.2/components/accordion/
Happy hacking!
I'm trying to create a fixed Navbar using Project Clarity
I'm using it in my Angular project, they are using FlexBox, I have tried putting in position: fixed but it doesn't seem to work, anyone have any ideas ?
<clr-header class="header-6">
In order to fix the header so that content scrolls underneath it, your application needs to have the correct Application Layout. Our components work within this structure because A properly structured layout enforces an optimal, consistent experience across applications.
The general structure for A Clarity Application layout takes this form:
<div class="main-container">
<div class="alert alert-app-level">
...
</div>
<header class="header header-6">
...
</header>
<nav class="subnav">
...
</nav>
<div class="content-container">
<div class="content-area">
...
</div>
<nav class="sidenav">
...
</nav>
</div>
</div>
Obviously, you can get rid of the parts that may not be relevant to your app like: alert-app-level, subnav etc ...
You can see this working in a quick demo I made with inspiration from Bob Ross. As you can see the content scroll underneath the application header.
if someone has also either very this problem, or another problem where some css does not work within Angular:
Since we mostly structure our UI code in multiple components in Angular, and since each component puts its own host-tag in the generated DOM between the actual html tags, the clarity library has some problems with it.
So as a workaround, if you still want to be able to keep your current htmls as they are, you can define this css in each your component's css file:
:host { display: contents; }
This causes the component's box not to render; means the host tags are still visible in DOM, but they will not have any effect regarding CSS. And any clarity CSS will work again.
for some reason my wordpress page broke.
usually the first thing on my home and about us page was a full width image with text on top. Now The page's Title with a white < div > is being shown on top.
https://malimo.co/unsere-vision/
https://malimo.co
This weirdly happened after I created a new page and built it with visual composer.
I tried tons of things like deactivating all plugins and I even reinstalled a complete backup of all files and database from 10 days ago. The problem still persists. The theme author is unresponsive and I have no clue what to do. I put tons of work into this site that's why any help or clue as to where I could look for a problem is greatly appreciated. Thank you.
EDIT:
This is what the site is supposed to look like:
HOME https://imgur.com/a/kbsIH
UNSERE VISION http://imgur.com/a/49MnS
Notice in the code below, that the outermost div with the class "theme__section__overlay" differs in that the functional version contains the class -image, where as the non-functional one contains the class -parallax
The Unsere-vision Version
<div class="theme__section__overlay -image">
<div class="parallax__wrap parallax">
<div class="parallax__image" data-bg-src="https://malimo.co/wp-content/uploads/2016/11/Screen-Shot-2016-11-13-at-11.04.19-1741x1080.png" style="background-image: url("https://malimo.co/wp-content/uploads/2016/11/Screen-Shot-2016-11-13-at-11.04.19-1741x1080.png");">
</div>
</div>
</div>
Home page
<div class="theme__section__overlay -parallax">
<div class="parallax__wrap parallax">
<div class="parallax__image" data-bg-src="https://malimo.co/wp-content/uploads/2016/11/Screen-Shot-2016-11-13-at-11.04.19-1741x1080.png" style="background-image: url("https://malimo.co/wp-content/uploads/2016/11/Screen-Shot-2016-11-13-at-11.04.19-1741x1080.png");">
</div>
</div>
</div>
Quite likely the case that you've missed changing a setting in visual composer to fix this issue.
I am currently prototyping a website using Foundation 5. I have a HTML5 section which contains an image, header and repeated background. This displays fine locally but as soon as I move the site over to my web server everything in the section tag disappears. It appears for a split second then disappears.
<section id="banner">
<div class="row">
<div class="large-12 columns">
<img class="logo" src="img/logo.png" alt="Logo">
<h1>Heading</h1>
</div>
</div>
</section>
Does anybody know why this is occurring? Seems odd that it only happens on the server.
Thanks in advance!
Please check the Stylesheet (CSS file) has been kept in right folder and CSS path is correct. I have used section tag in my own HTML5 Tutorial website and it is working perfectly. You can visit http://www.html5tutorial4u.com and check the source code of home page. I hope that it will help you a bit.
I'm somewhat perplexed by this.
..
The page im working on is located in
www.gd-gaming.com/wordpress/
However, for the background image to show, instead of putting it in
www.gd-gaming.com/wordpress/images
I've had to put it in
www.gd-gaming.com/images
Now, When I visit an additional page from the one im working on, (www.gd-gaming.com/wordpress/breakout-canidates/)
That background image dissapears. I cant understand why, I use the same code on a vbulletin website and the background displays everywhere. If I firebug it, it tells me the image didnt load, meaning the path is incorrect. I'm not sure where to put it though.
For actual reference..
http://www.gd-gaming.com/wordpress
http://www.gd-gaming.com/wordpress/breakout-canidates/
Code: <div id="background">
<img class="background" src="images/bgmain.jpg">
</div>
use absolute:
<div id="background"> <img class="background" src="/images/bgmain.jpg"> </div>
instead of relative one