I looked through older questions & answers and some examples about styling rounded corners and they seemed valid but when I look into the code in Panels 7.x-3.3 I see an entire function that dynamically generates rounded-corners and tells Drupal where to find the image files.

I have new image files for the rounded-corners. How do I over-ride this function without hacking the module itself?

Ex. (This function is in rounded_corners.inc)

 * Generates the dynamic CSS.
function _panels_rounded_corners_css($idstr) {
  $url = panels_get_path('plugins/styles/corners', TRUE);

  $css = <<<EOF

.t-edge, .b-edge, .l-edge, .r-edge, .wrap-corner {
  position: relative;
  /* hasLayout -1 ? For IE only */
  zoom: 1;
$idstr .t-edge {
  background: url($url/shadow-t.png) repeat-x 0 top;
  font-size: 1px;
$idstr .b-edge {
  background: url($url/shadow-b.png) repeat-x 0 bottom;
  font-size: 1px;
$idstr .l-edge {
  background: url($url/shadow-l.png) repeat-y 0 0;
$idstr .r-edge {
  background: url($url/shadow-r.png) repeat-y right 0;
$idstr .wrap-corner {
  background: #fff !important;
$idstr .wrap-corner .t-edge, $idstr .wrap-corner .b-edge {
  height: 11px;
$idstr .wrap-corner .l, $idstr .wrap-corner .r {
  position: absolute;
  top: 0;
  height: 11px;
  width: 11px;
  background-image: url($url/corner-bits.png);
$idstr .wrap-corner .l {
  left: 0;
$idstr .wrap-corner .r {
  right: 0;
  background-position: -11px 0;
$idstr .wrap-corner .b-edge .l {
  background-position: 0 -11px;
$idstr .wrap-corner .b-edge .r {
  background-position: -11px -11px;
$idstr .wrap-corner .r-edge {
  padding: 5px 24px;
$idstr div.admin-links {
  margin-top: -14px;
  margin-left: -12px;

$idstr .panel-separator {
  background: url($url/shadow-b.png) repeat-x 0 center;
  font-size: 1px;
  height: 30px;

$idstr .rounded-corner {
  margin-bottom: 1em;


  return $css;

1 Answer 1


The functionality you refer to predates common browser support for rounded corners, when images was the only reasonable solution.

Today, I would most likely no use it, but instead implement it with the modern CSS approach.

If you really want to modify the existing functionality though, it's called a Style. You can see this question for details about implementing ctools plugins: What are Ctools plugin (content type, access, etc), and how does one create them?

  • thanks Letharion for the link to your previous write-up about Ctools
    – fndtn357
    Aug 30, 2013 at 18:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.