Drupal 7 Drupal 7-l()与引导glyphicon一起使用时会导致双间距

Drupal 7 Drupal 7-l()与引导glyphicon一起使用时会导致双间距,drupal-7,twitter-bootstrap-3,glyphicons,Drupal 7,Twitter Bootstrap 3,Glyphicons,请参阅所附图片。我不知道为什么在使用l()创建的链接中添加glyphicon时会出现这种双间距。如果删除图示符图标,则文本为单间距 这是我生成菜单的代码 "<div class='btn-group dropup btn-full-width'> <button type='button' class='btn " . $managed . " btn-xs btn-full-width'>Manage</button> <

请参阅所附图片。我不知道为什么在使用l()创建的链接中添加glyphicon时会出现这种双间距。如果删除图示符图标,则文本为单间距

这是我生成菜单的代码

"<div class='btn-group dropup btn-full-width'>
        <button type='button' class='btn " . $managed . " btn-xs btn-full-width'>Manage</button>
        <button type='button' class='btn " . $managed . " dropdown-toggle btn-xs' data-toggle='dropdown'>
          <span class='caret'></span>
          <span class='sr-only'>Toggle Dropdown</span>
        </button>
        <ul class='dropdown-menu custom-blue' role='menu'>
          <li>" . l(' View Progress','observations/view_child/'.$row->child_id,array('attributes'=>array('class'=>array('btn', 'custom-blue','glyphicon', 'glyphicon-tasks', 'pull-left')))) . "</li>
          <li>" . l(' EYFS Profile / Learning Journey entry','observations/select_observation_type/' . $row->child_id,array('attributes'=>array('class'=>array('custom-blue','glyphicon','glyphicon-th-large')))) . "</li>
          <li>" . l(' Reports','observations/reports/' . $row->child_id,array('attributes'=>array('class'=>array('btn', 'custom-blue','glyphicon', 'glyphicon-print','pull-left')))) . "</li>
          <li>" . l(' Notebooks','observations/add_child_note/' . $row->child_id,array('attributes'=>array('class'=>array('btn', 'custom-blue','glyphicon', 'glyphicon-list-alt','pull-left')))). "</li>

          <li>" . l(' Next Steps','observations/view_next_steps/' . $row->child_id . '/0/0/',array('attributes'=>array('class'=>array('btn', 'custom-blue','glyphicon', 'glyphicon-random','pull-left')))) . "</li>
          <li>" . l(' Flags','observations/view_flagged_observations/' . $row->child_id,array('attributes'=>array('class'=>array('btn', 'custom-blue','glyphicon', 'glyphicon-flag','pull-left')))) . "</li>

          <li>" . l(' Edit Child Record','observations/edit_child/' . $row->child_id,array('attributes'=>array('class'=>array('btn', 'custom-blue','glyphicon', 'glyphicon-pencil','pull-left')))) . "</li>
          <li>" . l(' Child Contacts','observations/manage_child_contacts/' . $row->child_id,array('attributes'=>array('class'=>array('btn', 'custom-blue','glyphicon', 'glyphicon-phone-alt','pull-left')))) . "</li>

          <li>" . l(' Attendance Record','observations/attendance_record/' . $row->child_id,array('attributes'=>array('class'=>array('btn', 'custom-blue','glyphicon', 'glyphicon-list-alt','pull-left')))) . "</li>
          <li>" . l(' Attended Today','observations/mark_attended_today/' . $row->child_id,array('attributes'=>array('class'=>array('btn', 'custom-blue','glyphicon', 'glyphicon-ok','pull-left'), 'onclick'=>'if(!confirm("Register ' . $row->first_name . ' as attending today?")){return false;}'))) . "</li>
          <li>" . $backup_link . "</li>
        </ul>
      </div>
      </li>

    ";
}
$html .= "</ul>";
”
管理
切换下拉列表


";
}
$html.=“”;

如果字体大小不同,则可能需要应用不同的字间距,如果不提前计划,则可能会使样式表代码更加复杂

我添加了以下内容(sass scss):

在常规css中,这看起来像这样(未经测试,但含义相同):


查看之前的链接,我还必须在上面添加“position:relative;bottom:3px;”,因为我的链接是内联的。我知道您不需要这些信息,但其他人可能会无意中发现,这些花絮可能会为他们节省一些时间。

如果字体大小不同,您可能需要应用不同的字间距,如果您不提前计划,这可能会使样式表代码更加复杂

我添加了以下内容(sass scss):

在常规css中,这看起来像这样(未经测试,但含义相同):


查看之前的链接,我还必须在上面添加“position:relative;bottom:3px;”,因为我的链接是内联的。我知道您不需要这些信息,但其他人可能会无意中发现,这些花絮可能会为他们节省一些时间。

如果字体大小不同,您可能需要应用不同的字间距,如果您不提前计划,这可能会使样式表代码更加复杂

我添加了以下内容(sass scss):

在常规css中,这看起来像这样(未经测试,但含义相同):


查看之前的链接,我还必须在上面添加“position:relative;bottom:3px;”,因为我的链接是内联的。我知道您不需要这些信息,但其他人可能会无意中发现,这些花絮可能会为他们节省一些时间。

如果字体大小不同,您可能需要应用不同的字间距,如果您不提前计划,这可能会使样式表代码更加复杂

我添加了以下内容(sass scss):

在常规css中,这看起来像这样(未经测试,但含义相同):

查看之前的链接,我还必须在上面添加“position:relative;bottom:3px;”,因为我的链接是内联的。我知道你不需要这些信息,但其他人可能会无意中发现,这些花絮可能会为他们节省一些时间

.glyphicon {
    word-spacing: -0.5em;

    &:before {
        padding-right: 0.5em;
    }
}
.glyphicon {
        word-spacing: -0.5em;
}

.glyphicon:before {
        padding-right: 0.5em;
}