I have some datatables (as in datatables.net) running in PHP within a Laravel 9 framework. Everything works fine but the select length drop down is too small and results in the down arrow impinging on the number as below:
I have tried to find the css class which appears to be:
div.dataTables_wrapper div.dataTables_length select {
width: auto;
display: inline-block;
}
but changing this seems to have no effect - min-width etc. And I did clear all caches!
The rest of it is perfect.
Thanks!
I want to code format my Less stylesheets similar to how Bootstrap does it - by column. I don't know if I'm languaging it right, so I've included a screenshot of what I'm looking for:
Currently I use either Sublime Text or Visual Studio Code, or, I guess Vim sometimes, but I do most coding in the first two. I can do this manually, but it's a pain in the *ss.
I've also experimented with Sublime plugin AlignTab, but I didn't get anywhere.
I've looked quite a bit for how to do this, but I concede that it's possible I'm missing something obvious. I'm tempted to email Bootstrap developers, and ask how they do it. Can't be too hard, can it?
There are several extensions in the marketplace that aim to solve this issue. I just installed Align, the most popular one, and then copied the first less code I could find from http://lesscss.org/
#base: #f938ab;
.box-shadow(#style, #c) when (iscolor(#c)) {
-webkit-box-shadow: #style #c;
box-shadow: #style #c;
}
.box-shadow(#style, #alpha: 50%) when (isnumber(#alpha)) {
.box-shadow(#style, rgba(0, 0, 0, #alpha));
}
.box {
color: saturate(#base, 5%);
border-color: lighten(#base, 30%);
div { .box-shadow(0 0 5px, 30%) }
}
I then selected the code and used the align command and got this:
Some of the other extensions might not require you to select the text first, or might format differently, so don't be afraid to try them out.
If you're asking if there is a built-in way to do this, though, not to my knowledge.
I'm building a site in Joomla 3 on T3 framework.
I'm having to use LESS for the first time, but am experienced with CSS.
The site will have differently themed landing pages. These will all be identical except for the colour scheme.
I am attempting to set up a colour scheme in the T3 'variables' less file and then implement the colours - the colour will be different for many core components - such as H1, P, DIV Background Color, etc.
So if I set up, say, a master colour for Thailand's page, I create this rule in the variables.less file:
#thai: #e55092;
and then my knowledge of exactly how LESS compiles to CSS falls flat and I lose my entire train of thought.
Because I now want to be able to set up a landing page for Thailand in the T3 template. I need to be able to use the class 'thai' in various places in this page - for instance, the H1 text should be coloured #e55092, an aside background should be #e55092, an HR should be #e55092 ... for THIS page only.
I hope this isn't a too open question but what would be best practice for achieving this, keeping my code clean and fast? My current line of thought is that I create a whole bunch of rules in LESS along the lines of:
thai.h1 { color: #thai }
thai.button [ background-color: #thai }
(excuse syntax - very new to LESS and not sure what's possible or correct)
But isn't that defeating the whole purpose of using LESS in the first place?
I think your question is very broad indeed. Depending on your situation:
One CSS file for all pages. You can consider changing selector order The code for a button can then look like that shown beneath:
.button {
border: 1px solid white;
.thai & { background-color: red;}
.japanese & { background-color: yellow;}
}
In your HTML pages: <body class="thai"> and so on..
Compile different CSS files for each landing page
In Less you can override a variable by putting the definition afterwards
You should first define a main file, for the button example this button.less file should contain something like that shown below:
#button-background-color: orange;
button { background-color: #button-background-color; }
Now you can define you thai theme file (thai.less) as follows:
#import "button.less";
#button-background-color: red;
Or alternatively compile different CSS files using the modify-var option:
lessc button.less --modify-var="button-background-color=red" thai.css
I've written a fiddle (http://jsfiddle.net/929Zb/5/) for this that reduces the problem to the minimal markup that demonstrates the problem... which is my Highchart isn't being rendered in Safari (version 5.1.7 on Windows but I've also run it in the latest version on a MacBook.)
My requirement is a multiple column layout of widget as shown in this screenshot from the fiddle running in chrome :
and here's the same thing running in Safari :
Safari has rendered SVG and hovering over it in debug highlights the elements in blue in the HTML but it just can't be seen!!
The css I'm using to display the column is shown below. If you change the column count from 2 to 1 the chart displays fine in Safari!!
.widget-container
{
-webkit-column-count: 2;
-webkit-column-gap: 2em;
-moz-column-count: 2;
-moz-column-gap: 2em;
column-count: 2;
column-gap: 2em;
}
.widget {
/* This is required to keep the widget div's together and not break them over columns */
-webkit-column-break-inside: avoid;
-moz-column-break-inside: avoid;
column-break-inside: avoid;
margin-bottom: 2em;
}
Is there a change to the CSS that will make Safari work or will this require a javascript fix? I pondered whether this was something to do with CSS transitions so tried turning off animations but given it's still animating I've clearly got the syntax wrong. I have a time constraint on this problem so I'm posting now but will report back if I have any progress.
I think this is some CSS problem with displaying chart in any column different than first one. If you disable colum-break-inside it also works.
What can I suggest is to disable position for chart container: http://jsfiddle.net/929Zb/17/
.highcharts-container {
position: inherit !important;
}
In my info.plist, I added a key "Fonts provided by application" and added EdwardianScriptITCStd.otf
But, when I try to get that font, it returns nil:
NSLog(#"%#", [UIFont fontWithName:#"EdwardianScriptITCStd"
size:16.0f]);
I printed the font families using [UIFont familyNames] and it's not there either:
(
Thonburi,
"Snell Roundhand",
"Academy Engraved LET",
"Marker Felt",
"Geeza Pro",
"Arial Rounded MT Bold",
"Trebuchet MS",
Arial,
Marion,
"Gurmukhi MN",
"Malayalam Sangam MN",
"Bradley Hand",
"Kannada Sangam MN",
"Bodoni 72 Oldstyle",
Cochin,
"Sinhala Sangam MN",
"Hiragino Kaku Gothic ProN",
Papyrus,
Verdana,
"Zapf Dingbats",
Courier,
"Hoefler Text",
"Euphemia UCAS",
Helvetica,
"Hiragino Mincho ProN",
"Bodoni Ornaments",
"Apple Color Emoji",
Optima,
"Gujarati Sangam MN",
"Devanagari Sangam MN",
"Times New Roman",
Kailasa,
"Telugu Sangam MN",
"Heiti SC",
"Apple SD Gothic Neo",
Futura,
"Bodoni 72",
Baskerville,
"Chalkboard SE",
"Heiti TC",
Copperplate,
"Party LET",
"American Typewriter",
"Bangla Sangam MN",
Noteworthy,
Zapfino,
"Tamil Sangam MN",
"DB LCD Temp",
"Arial Hebrew",
Chalkduster,
Georgia,
"Helvetica Neue",
"Gill Sans",
Palatino,
"Courier New",
"Oriya Sangam MN",
Didot,
"Bodoni 72 Smallcaps"
)
What am I missing?
Thanks!
My comments were starting to get lengthy, so I've decided to submit an answer instead :)
Custom fonts are only supported in iOS 3.2 and above, so make sure your Deployment Target build setting doesn't go back any farther than version 3.2.
Verify that the font is included in your build target (in the "Copy Bundle Resources" build phase)
Check the raw value of the key for "Fonts provided by application" to make sure it's correct. When viewing the *.plist in Xcode, right-click and choose "Show Raw Keys/Values", then verify the key is UIAppFonts.
I believe iOS requires the PostScript name for a font when using fontWithName: size:, which you can find/verify by opening the font in Apple's Font Book and typing command+I.
At one point, there was an issue with using custom fonts and UILabel. I am not sure if this problem still exists. The solution was to subclass UILabel and set the font therein.
If it still doesn't work, this Stack Overflow thread on custom fonts has quite a bit of info, you may have some luck there.
EDIT
There's no guarantee that I have the same font file as you, but on my machine the PostScript name is "EdwardianScriptITC"
If your font name include '-' character, replace it with space character. For instance, Arial-Bold.ttf is used like [UIFont fontWithName:"Arial Bold" size:10];
The font name to be used seems to be the "Family name" in the Font Book. I tried the PostScript name, but it does not always work. Family Name, as far as I can tell, has always worked up until now.
You can check this information, as mentioned in the above answer, inside Font Book, select the font and press cmd+I.
Hope this helps...
i was having the same issue. you can set font to a label from interface builder at storyboard. then get that font in debug mode from label like :
let cfnt = txtUsernameField.font
then click the i button on the little debug window and the family name of font will be writed on the console window. and you can use it like that :
txtUsernameField.font = UIFont(name: "MyriadPro-CondIt", size: 14)
I had this problem although I swore I had custom fonts working just fine previously.
Turns out I just needed to run "Clean" on my project in XCode project so it could re-establish the references.
The problem I ran into is that some of the fonts from the font family returned correctly while others returned nil.
For example:
MuseoSansRounded-500 valid
MuseoSansRounded-900 nil
It turned out that Xcode was automatically including custom fonts that had been used in Interface Builder. I had used the 500 weight font in IB but not the 900 weight one.
These two steps fixed it for me:
In Build Settings, find and disable Auto-Activate Custom Fonts. There were two instances of this in my project.
On app launch, manually register the custom fonts with the system. I used the snippet from this SO answer: https://stackoverflow.com/a/32600784/131378
In the name of completeness, I could have left Auto-Activate Custom Fonts turned on and then skipped registering those fonts in code. However, I didn't want to update the code during development if I ended up using a new font in IB that was previously being registered manually. Xcode complains if you register a font that was already auto-activated.