How to return a “text” in css less?
Tags: css,css3,less
Problem :
how to do something like this: ?
.test1(@light: 1px;){
"inset 0 @light 0 rgba(255, 255, 255, 0.2)";
}
.test2(@elevation: 3px;){
"0 @elevation 0 rgba(000, 000, 000, 0.1)";
}
@testing: .test1() "," .test2();
box-shadow: @testing;
sorry about my english, i'm portuguese
Solution :
I recommend the following approach:
// Box shadow.
.mx-box-sh (@arguments) {
-webkit-box-shadow: @arguments;
-moz-box-shadow: @arguments;
box-shadow: @arguments;
}
// Mixin for your specific needs.
.mx-my-box-sh (@light: 1px, @elevation: 3px) {
.mx-box-sh(e(%("inset 0 %s 0 rgba(255, 255, 255, 0.2), 0 %s 0 rgba(0, 0, 0, 0.1)", @light, @elevation)));
}
// Call the mixin.
.my-selector {
.mx-my-box-sh();
}
Make sure you’re using the latest LESS compiler (1.4.0).
As much as I’m aware, you can’t “return” text from mixins. Mixins are, in fact, procedural constructs that don’t return anything whatsoever.
CSS Howto..
You need to float your links. Add 'float:left' to both of your links' css.
Replace with my give code. .chat li.left .chat-body { margin-left: 10px; border: 1px solid #DDDDDD; padding: 10px; background-color: whitesmoke; border-color: #e3e3e3; /*box-shadow: 0 1px 0 #cfcfcf;*/ border-radius: 2px; /* margin-right:...
If you go the Google route, your code should look like: HTML: <link href='https://fonts.googleapis.com/css?family=Pacifico' rel='stylesheet' type='text/css'> CSS: body { font-family: 'Pacifico', cursive; } If you go the '@import' route, and...
I agree with @Huangism who wrote in a comment, that this isn't possible with the :active pseudo class. However, you could use a HTML checkbox, a label for that checkbox...
It works with border-radius, you just can't see it because the overlapping li elements. Setting overflow:hidden to .second-level-menu will cause the radius to show. /* Menu Styles */ .third-level-menu {...
The width will be fine with position:relative in .progressbar-container and height is given by you only the problem is when you use position:absolute in children element you need to use...
add -webkit- prefix to the keyframes also, like this @-webkit-keyframes { /* rest other code goes here */ } ...
Maybe you were thinking of something like this? Fiddle It's not greyscale, but it provides a similar effect. EDIT: Here's a version for Webkit with greyscale using -webkit-filter (still right-to-left...)...
Here a little code that will do what you want : $('div:not(:first)').each(function(){ var numEl = $(this).parentsUntil('div:first', 'ul').length - 1; $(this).css('padding-left', numEl * 20 +'px') }) It count the number of...
Unless someone can come up with a better answer, what I'm having to do is create a media query just for the iPhone6 Plus in Landscape Mode, and fix issues....
How you would go about this greatly depends on how you want the spacing to be when there's actually content here. These techniques will work with any tags, I chose...
you could add a hidden control to your page and store it there.. I.E in ASPX <asp:HiddenField runat="server" id="hdnCSS" ClientIDMode="Static" /> When you run your JS add a little code...
Here is an example of how it can be done with just plain CSS. Be sure to add any vendor prefixes. div { box-shadow: -1px 1px 0px 1px rgba(0,0,0,0.5), -2px...
Replace all text-decoration: bold; with font-weight:bold UPDATE A downvote, seriously? He is putting the link in description class, which only needs to be fixed Now style can see (after replace...
Check this tutorial http://tympanus.net/codrops/2013/08/13/multi-level-push-menu/. Demo of tutorial here : http://tympanus.net/Development/MultiLevelPushMenu/...
There are various hack-y ways to force re-rendering. script.aculo.us has a method called forceRerendering (naturally) that looks like this: someElement.appendChild(document.createTextNode(' ')); someElement.removeChild(someElement.lastChild); That ought to work in this case, too....
You are adding the '.active' class on the client-side, so as soon as your page does a full postback everything is being re-created on the server-side. If you want to...
Inline styles on HTML elements are written as HTML attributes. You would use the 'style' attribute and give it a value that is wrapped in quotes. Also, you need to...
It looks like the issue is the lack of defining a border-style to your element. If you use the shorthand version of defining the border (for simplicity), you'll see it...
HTML <tr> <td id="Homebutton" runat="server" class="menubutton"> <a href="home.html">Home</a> </td> </tr> CSS td { padding: 0; } .menubutton > a { display: block; width: 101px; height: 44px; background-repeat: no-repeat; vertical-align: top;...
Unfortunately you cannot do this in pure CSS, by default the child element never inherits the width, you need to specify it, yes, by default it will span 100% if...
May be something like this http://jsfiddle.net/g536q/?
Try $(document).ready(function () { var a = $(".a") , elems = $("#outer_div div").not(a) , pos = function () { return $.map(elems, function (el, i) { return $(el).css(["left", "top"]) }).reverse() }...
I use a grunt task called wiredep. It looks for the bower components that my app uses and add a reference to the css/js files to the file I specify....
You red divs are floated right, and wider than the parent, causing all the content to extend to the left side. You paragraphs are not floated so they're on the...
You can define your own cols. See: http://www.bootply.com/AnCCbwcwEA <div class="row"> <div class="myCol"> <div class="circle"></div> </div> <!-- Seven more circles here --> </div> CSS: .myCol has a width of 12.5%, because...
Try setting captcha container to 100% as well .captcha, #recaptcha_image, #recaptcha_image img { width:100% !important; } Fiddle: Here...
[SOLVED] My main problem was just that the banner was not in the same position on Chrome and Safari when using z-index to stack my divs. On these two browsers,...
Your code is fine till this part; $(elementId).parent().mouseover(function (event) { $(this).parent().qtip({ .... }); }); ..... So basically you are calling ".parent" twice. just remove ".parent()" from $(this).parent().qtip and it will...
Don't use div use a span insert: function(data){ return '<span >' + '<span class="mentionedUser">[' + data.name + ']</span><div class="hiddenMentionUserID" style="display:none;">'+data.id+'</div>' + '</span>'; } ...