Cascading Style Sheets (CSS) is a style sheet language used to describe the presentation semantics (the look and formatting) of a document written in a markup language.

learn more… | top users | synonyms

0
votes
0answers
14 views

How do I add inline-css during hook_css_alter in Drupal 8?

I have a use-case where I need to dynamically attach inline-CSS (and JS) at runtime. In hook_css_alter I cannot see how to attach it and I keep ending up with: Exception: Invalid CSS asset type. in ...
0
votes
1answer
28 views

Customize admin form field in

I need to customize the aspect of one single field in a editing admin form. More specifically I want change the height of a multiselect field. Have I to create complete admin sub-theme containing just ...
1
vote
1answer
36 views

How can I add an external (CDN) CSS style sheet to a theme?

I'm trying to add Font Awesome to a Bootstrap subtheme I have made. Here is the code I am using in subtheme.libraries.yml, which is based on the documentation for hosting external JS libraries in ...
0
votes
1answer
15 views

Form problem : calendar pop up overriden by an autocomplete field

Drupal 7. I use a bootstrap theme with some customized css. I have a node/edit form with a date field with calendar popup widget and an entityreference field with autocomplete widget. When I click on ...
0
votes
1answer
22 views

Add class to section in tpl

In my template (Bootstrap), in the following line: <section<?php print $content_column_class; ?>> I need to add a custom class AND keep the dynamic column class. I tried <section ...
0
votes
1answer
28 views

My theme CSS uses relative paths, but Advagg or another module seems to be rewriting them to absolute paths. Core aggregation uses relative paths

Our CSS authored in the theme uses relative paths for all references to assets But the CSS aggregated/processed by Advagg has absolute paths where the authored CSS uses relative paths I can't see ...
0
votes
1answer
30 views

Bootstrap CDN over-rides my custom CSS files

I have a modest site that I was hired to help customize with some CSS features, however I am noticing a problem. Bootstrap has its own mini-file that tells it what to style its navigation bars with ...
1
vote
2answers
22 views

Disable theme css via module

I'm using Drupal 7. I want to disable css defined by theme because I want to use my custom css that is defined by my custom module. What I mean is, I want to disable ...
0
votes
1answer
22 views

How to add css immediately (display:none) to a block created through hook?

I created a block through drupal hook_block_info (and hook_block_view, but this doesn't really matter) function mymodule_block_info() { $blocks['menu_mobile'] = array( 'info' => t('Mobile ...
-1
votes
0answers
13 views

jQuery only works on tablet and smartphone if I refresh

I have a jQuery script, which works perfect on desktop, but on tablets and smartphones it only works if I refresh the page or change the orientation. I have a h2.block-title where I change the color, ...
-2
votes
3answers
67 views

How to add css on Drupal 8?

Here is an example of my *.info file Why the page cannot load the CSS that I add myself?
0
votes
1answer
37 views

Drupal 8 JS and CSS imagepath

Do I need to hardcode the image path to JS and CSS files ? like in css: #mydiv { background: url(http://example.org/themes/mytheme/image/bg.png); } I cannot use in .js and .css files the {{ ...
0
votes
1answer
21 views

CSS Not Displaying Correct Via .info File (ok on page.tpl)

Hello I have a strange situation that I just cannot get my head around and I hope someone can help. If I add css directly in page.tpl as: <style type="text/css"> my css </style> ...
3
votes
1answer
52 views

How to add JavaScript or CSS library to Composer project?

For some cases, there is the need to add a JavaScript or CSS package to a project. One of those cases was the DropzoneJS package for the drupal/entity_browser. All recommendations I could read online ...
0
votes
0answers
15 views

CSS Injector not serving most current version

I have made changes to a CSS Injector rule on my Drupal 7 site. Despite flushing all the caches several times, the CSS file that is included on the live site is not the most current version of the CSS ...
0
votes
1answer
69 views

CSS and JS are not showing

I just started using Drupal 8 and i am already experiencing problems. In my info.yml file I've added library/ies and in my libraries.yml are those files included. And when I clear cache in Admin, the ...
0
votes
1answer
40 views

Is responsive.desktop.css for desktop & laptops design?

I am also using the Adaptive theme and same question raised. I checked their documentation, but they do not have point to point instruction. Its css file has following file, global.base.css ...
3
votes
2answers
83 views

How to add CSS classes to a an image which belongs to a content type?

I have a content type with an image field; I would like to add CSS classes to those images. I have looked at the values of the $content variable in node.tpl.php via the dpm(), but I couldn't see any ...
0
votes
1answer
33 views

Adaptive theme css which stylesheet to use?

In the adaptive theme in the sass folder and it has following files, I understand about some stylesheets and for what purpose they are. But I am confuse about global.base.scss, global.style.scss, ...
1
vote
1answer
22 views

Are regions and features automatically created when creating a sub subtheme?

I want to inherit everything from a main theme except the layout. When I create the .info file and specify which regions and features I want are these generated automatically by drupal or do I have to ...
3
votes
1answer
75 views

add CSS programmatically for a specific page in .theme file

I have a question about adding a CSS file programmatically depending on which site I visit. In Drupal 7 I could achieve this by calling the following line in the preprocess_html method in the ...
0
votes
1answer
17 views

In a managed_file upload field, how do I prevent an overflow with long file names?

I have a form using the field type of managed_upload. Things are working fine accept when the file name is long. Given the snippet of code, below. Might there be a way to override CSS or inject ...
0
votes
3answers
19 views

Different css of #main-content at differnt page url?

I have set the css of the main content in theme css as, #main-content { background:#CCC; box-shadow: 0 0 1px #0F4C6A; } So it gets apply to the every page/node/content whatever I create ...
0
votes
0answers
22 views

changing value of the form inside .module

I have a field in my newsletter, where user can enter his custom css. That css is being applied for emails that are sent as newsletters. Since I kinda want to create a default template, I'd rather ...
0
votes
2answers
22 views

Overriding, create theme from scratch or modifying core theme?

I have noticed there are many ways of doing this and just wanted some advice on which to go for. I have a static webpage and trying to migrate my CSS to Drupal. Can I inherit main functions of a core ...
0
votes
1answer
22 views

Customize the output style of a view field

I have a view block, where fields are added in the table. I followed below steps to customize the output fields: Navigate to the edit screen for a view (for example, ...
0
votes
0answers
21 views

drupal customize content type edit page

I'm working with a client that wants to have a unique layout of the content type edit page. For instance, my content type "Challenges" would have a different layout that it currently does. Is this ...
0
votes
0answers
22 views

How to get all CSS and JS that are attached to the page? [duplicate]

In Drupal 7 you could get it by invoking drupal_add_css() or drupal_add_js() without any arguments. How to do this in Drupal 8?
0
votes
1answer
70 views

How do I get a list of all CSS and JS that are attached to a page?

In Drupal 8, how do I get all CSS and JS that is attached to a page? In Drupal 7, I could use drupal_add_css() or drupal_add_js() without arguments, to get an array containing a list of all the ...
0
votes
1answer
53 views

Custom CSS and JavaScript [closed]

How to add custom css and javascript file in Drupal 8.
0
votes
0answers
27 views

Enable the auto-complete drop down option for bootstrap in code editor?

I am currently using Notepad ++ to edit the css/html code of my bootstrap sub-theme installed on a drupal 7 website, however my problem is that i cannot enable the auto-complete drop down option for ...
1
vote
1answer
119 views

Why don't I get any CSS output?

I did a fresh install of Drupal 8. Everything had a nice style while installing, but when it was done, there was no CSS anymore. Did the installation change some file rights? I tried flushing the ...
1
vote
3answers
31 views

How can the divs added by default by Views be removed?

In Views module, if I don't use any classes, even not the default, it still insists of wrapping the field contents into divs. I have had to use views-view-fields--VIEW-ID.tpl.php to theme the content, ...
1
vote
2answers
104 views

Add class to content field (link)

I want to add a class to the <a>-Tag of a Field that consists of a URL-link and a link text (it's a field of type "Link") and the name of the field is content.field_c_button_link So with twig in ...
0
votes
4answers
37 views

Adding a css in preprocess view not woking

I'm trying to add a css to a view, through the preprocess view as below function mytheme_preprocess_views_view(&$vars) { $view = &$vars['view']; if ($view->name == 'gallery_view') { ...
0
votes
0answers
11 views

How to create a css class for private vs. public organic groups

Is there a way of introducing a css class on the basis of whether a group is public vs. private? I thought the context_OG might provide a condition which would allow this but it seems not. I'm not ...
0
votes
1answer
34 views

500 Server Error - Drupal Migration

I apologized as I'm not well versed specifically with drupal. But anyway, I was migrating an existing installation on a Windows Server to a Linux Server (debian). I went ahead and moved all the ...
0
votes
3answers
37 views

Remove default css file

I need to remove jquery.ui.theme.css file, for this in my template.php I implement the below mentioned code: function GNG_css_alter(&$css) { unset($css[drupal_get_path('module', 'misc') . ...
1
vote
1answer
50 views

Image Radio Buttons in Drupal Forms API [duplicate]

I have a radio button element in my Form API. See code below. $active = array(0 => t('Line'), 1 => t('Rectangle'), 2 => t('Ellipse'), 3 => t('Text'), 4 => t('Image')); ...
0
votes
1answer
43 views

How do I set “Add to Cart form” css globally using Commerce Kickstart as basis?

My goal is to borrow the Add to Cart form style from Commerce Kickstart on a site where: Panels: Node Templates controls the Product Displays Subtheme of Commerce Kickstart sets the CSS / template ...
0
votes
1answer
24 views

Lost Social Connection Icons after uploading custom images

I created a subtheme for Commerce Kickstart / Omega. As part of the refresh, I want to use the existing "Connect with Us" block, but replace the existing icons with customized images (theme consistent ...
0
votes
0answers
54 views

Why won't Drupal serve any CSS files? Nothing in sites/default/files/css

In my Drupal 8 installation profile, I install a theme and a lot of configuration for it. I'm using Features to install blocks/settings/views for it, but when I enable the feature Drupal stops ...
1
vote
1answer
68 views

How add a css id selector to a views row

I need to add a css id selector to a views row. Of course this is straight forward with a class selector such as .my-class but how do I insert something like #my-class at the individual row level? I ...
0
votes
0answers
90 views

stylesheets-remove in .info.yml file doesn't work

I'm following this tutorial to create a Drupal 8 theme. You can see that they are saying that default css is added by the modules in the core like this: Now you can remove these stylesheets by ...
0
votes
1answer
18 views

Omega theme conflicts with CSS of Seven administration theme, how to resolve?

Not sure exactly where my problem stems from but here goes: I am developing a site with an Omega4 subtheme. Something in the css rules is conflicting with the CSS for the Div: Views-ajax-popup and ...
0
votes
1answer
26 views

path from theme css

I'm trying to include my own font to my drupal website. I've got a custom.css file in my theme inside 'sites/all/themes/mytheme/css' folder. My fonts are in my 'sites/all/themes/mytheme/fonts' ...
0
votes
0answers
10 views

Zip code in checkout pane in mobile displays to far right where users don't find it

Theme issue perhaps. Commerece kickstart 2, sub-theme of Kickstart, zip code is displayed to the far right on mobile screens (android) and the users can't find it to fill in. Quick hack is added ...
0
votes
3answers
82 views

How to add extra classes in body tag so that i will come only for the anonymous user?

I want to add a extra unique class in body tag so that it will come only for the anonymous user. How to add it?
-1
votes
1answer
39 views

Switch default bootstrap styles with different ones

I have this site that's using a subtheme of Drupal Boostrap theme. The contents are mainly made with views. I want to change the look of the table on the link with the style of the condensed table on ...
1
vote
1answer
42 views

How to provide user-defined revisionable css styles?

I want to provide option for admin to attach CSS styles on specific urls(just like block visibility can be set). This style is stored in config entity and is revisionable. Since config entities do ...